Change language

PHP IntlChar :: totitle () Function

Syntax:
mixed IntlChar::totitle ($codepoint)
Parameters: This function takes one parameter, $codepoint which is required. The $codepoint parameter is a character or integer encoded as a UTF-8 string.Returned Value:Returns the simple_Titlecase_Mapping of the code point, if any ; otherwise, the code itself The return type will be an integer if the code point was not passed as a UTF-8 string, in which case the string will be returned.The programs below illustrate the IntlChar::totitle function()in PHP:Program 1:
// PHP function for illustration
// using IntlChar::totitle()  
// Enter capital letter var_dump (IntlChar::totitle ( "G" ));  
// Enter capital letter var_dump (IntlChar::totitle ( "g" ));  
// Enter capital letter var_dump (IntlChar::totitle ( "a" ));  
// enter an int char identifier
// code values ​​ var_dump (IntlChar::totitle ( "u {00A0}" ));  
// Enter the character space code point value var_dump (IntlChar::totitle ( "" ));  
// Enter the character value of the code point var_dump (IntlChar::totitle ( "^" ));  
// Enter int codepoint value var_dump (IntlChar::totitle ( "9" ));  
// Enter the control character breakpoint value var_dump (IntlChar::totitle ( "" ));  
// Enter the character value
// return ASCII value var_dump (IntlChar::totitle (ord ( " D " ))); var_dump (IntlChar::totitle (ord ( "d" )));  
// Enter the ASCII value 0054 & quot; T & quot; var_dump (IntlChar::totitle (ord ( "0054" ))); var_dump (IntlChar::totitle (ord ( "@" )));  
?>
Output:
string (1) "G" string (1) "G" string (1) "A" string (2) "" string (1) "" NULL string (1) "9" string (1) " "int (68) int (68) int (48) int (64)
Program 2:
// PHP function for illustration
// using IntlChar::totitle() 
// Declare an array with
// different code value $arr = array ( "X" , " x " , " * " , "8" , "0" , "" , );  
// To check the status of the loop
// each character via function foreach ( $arr as $val ) { // Validate each element as code point data var_dump (IntlChar::totitle ( $val )); }
?>
Output:
string (1) "X" string (1) "X" string (1) "*" string (1) "8" string (1) "0" string (1) ""
Related Articles:
  • IntlChar::isspace()
  • IntlChar::isIDIgnorable() Function
  • IntlChar::isIDStart() Function
  • IntlChar::isIDPart() Function
Link: http://php.net/manual/en/intlchar.totitle.php

Shop

Learn programming in R: courses

$

Best Python online courses for 2022

$

Best laptop for Fortnite

$

Best laptop for Excel

$

Best laptop for Solidworks

$

Best laptop for Roblox

$

Best computer for crypto mining

$

Best laptop for Sims 4

$

Latest questions

NUMPYNUMPY

Common xlabel/ylabel for matplotlib subplots

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Why do I get "Pickle - EOFError: Ran out of input" reading an empty file?

12 answers

NUMPYNUMPY

Flake8: Ignore specific warning for entire file

12 answers

NUMPYNUMPY

glob exclude pattern

12 answers

NUMPYNUMPY

How to avoid HTTP error 429 (Too Many Requests) python

12 answers

NUMPYNUMPY

Python CSV error: line contains NULL byte

12 answers

NUMPYNUMPY

csv.Error: iterator should return strings, not bytes

12 answers


Wiki

Python | How to copy data from one Excel sheet to another

Common xlabel/ylabel for matplotlib subplots

Check if one list is a subset of another in Python

sin

How to specify multiple return types using type-hints

exp

Printing words vertically in Python

exp

Python Extract words from a given string

Cyclic redundancy check in Python

Finding mean, median, mode in Python without libraries

cos

Python add suffix / add prefix to strings in a list

Why do I get "Pickle - EOFError: Ran out of input" reading an empty file?

Python - Move item to the end of the list

Python - Print list vertically