Open In App

PHP | IntlChar istitle() Function

Last Updated : 16 Feb, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

The IntlChar::istitle function is an inbuilt function in PHP which is used to check whether the input character code point is a titlecase letter or not. In True cases, the characters with the general category are “Lt” (titlecase letter).
Syntax: 
 

bool IntlChar::istitle( $codepoint )

Parameters: This function accepts a single parameter $codepoint which is mandatory. The input parameter $codepoint is a character or integer value, which is encoded as a UTF-8 string.
Return Value: Returns True, if $codepoint is a titlecase letter, otherwise return False.
Below programs illustrate the IntlChar::istitle() Function in PHP:
Program 1: 
 

php




<?php
// PHP function to illustrate the
//use of IntlChar::istitle()
    
// Input Capital letter  codepoint
var_dump(IntlChar::istitle("Welcome to Geeks"));
   
// Input Capital letter  codepoint
var_dump(IntlChar::istitle("\u{03A6}"));
   
// Input Capital letter  codepoint
var_dump(IntlChar::istitle("?"));
   
// Input int char an identifier
// of codepoint value
var_dump(IntlChar::istitle("\u{00A0}"));
    
// Input symbolic space codepoint value
var_dump(IntlChar::istitle(" "));
  
// Input symbolic codepoint value
var_dump(IntlChar::istitle(" ^ "));
 
// Input int codepoint value
var_dump(IntlChar::istitle("3"));
    
?>


Output: 

NULL
bool(false)
bool(false)
bool(false)
bool(false)
NULL
bool(false)

 

Program 2: 
 

php




<?php
// PHP function to illustrate the
// use of IntlChar::istitle()
  
// Declare an array with
// different codepoint value
$arr = array("G",
             "\u{03C6}",
             "\t",
        );
    
// For loop condition to check
// each character through function
foreach ($arr as $val) {
        
    // Check each element as code point data
    var_dump(IntlChar::istitle($val));
}
?>


Output: 

bool(false)
bool(false)
bool(false)

 

Reference: https://www.php.net/manual/en/intlchar.istitle.php
 



Similar Reads

PHP | IntlChar::isJavaIDStart() Function
The IntlChar::isJavaIDStart() function is an inbuilt function in PHP which is used to check whether the input character code point is permissible since the first character is a java identifier or not. It is True for characters with general category "Sc" (Currency Symbols), and "Pc" (Connecting Punctuation). Syntax: bool IntlChar::isJavaIDStart( $co
2 min read
PHP | IntlChar::isJavaSpaceChar() Function
The IntlChar::isJavaSpaceChar() function is an inbuilt function in PHP which is used to check whether the input character code point is a space character or not according to Java. Its value is True for characters with general category "Z" (Separators), which does not include control character.Syntax: bool IntlChar::isJavaSpaceChar( $codepoint ) Par
2 min read
PHP | IntlChar::iscntrl() Function
The IntlChar::iscntrl() function is an inbuilt function in PHP which is used to check the given input is a control character or not. Control characters are line feed, tab, escape, etc. A control character is one of the following types: ISO 8-bit control character (U+0000..U+001f and U+007f..U+009f)IntlChar::CHAR_CATEGORY_CONTROL_CHAR (Cc)IntlChar::
2 min read
PHP | IntlChar::isdigit() Function
The IntlChar::isdigit() function is an inbuilt function in PHP which is used to determine the given input code data is a digited character or not. It returns true when the character is under the general category decimal digit numbers. Beginning with Unicode 4, this is the same as testing for the Numeric_Type of Decimal. Syntax: bool IntlChar::isdig
2 min read
PHP | IntlChar::isblank() Function
The IntlChar::isblank() function is an inbuilt function in PHP which is used to determine the given input code data is blank or horizontal space character and the character visible separates words on a line. If the input contains U+0009 (TAB) and characters "Zs" (space separators) except Zero Width Space (ZWSP, U+200B) then it will be True. A Unico
2 min read
PHP | IntlChar::isalpha() Function
The IntlChar::isalpha() function is an inbuilt function in PHP which is used to check the given input is an alphanumeric character or not. Syntax: bool IntlChar::isalpha( $codepoint ) Parameters: The IntlChar::isalpha() function accept single parameter $codepoint which is mandatory. The input parameter is an integer value or character, which is enc
1 min read
PHP IntlChar::isbase() Function
PHP IntlChar::isbase() function is an inbuilt function in PHP that is used to check whether the given input data is a base character or not. If the specified code point is a base character then it returns TRUE for general categories "L" (Letters), "N" (numbers), "Mc" (spacing combining marks), and "Me" (enclosing marks). Syntax: bool IntlChar::isba
2 min read
PHP | IntlChar::isalnum () Function
The IntlChar::isalnum() function is an inbuilt function in PHP which is used to check the given input is an alphanumeric character (Digit or Letter) or not. It returns TRUE for characters with general categories "L" (letters) and "Nd" (decimal digit numbers). Syntax: bool IntlChar::isalnum( $codepoint ) Parameters: This function accepts single para
2 min read
PHP | IntlChar::isprint() Function
The IntlChar::isprint() function is an inbuilt function in PHP which is used to check whether the given input character is a printable character or not. Syntax: bool IntlChar::isprint( $codepoint ) Parameters: This function accepts a single parameter $codepoint which is mandatory. The input parameter is an integer values or character, which is enco
2 min read
PHP | IntlChar::isupper() Function
The IntlChar::isupper() function is an inbuilt function in PHP which is used to check whether the given input character is an uppercase character or not. Syntax: bool IntlChar::isupper( $codepoint ) Parameters: This function accepts a single parameter $codepoint which is mandatory. The input parameter is a character, which is encoded as a UTF-8 str
2 min read
Article Tags :