PHP common string processing functions PHP string operations common functions/** determine string length * intstrlen (stringstr) * compare two strings * 1. strcmp functions perform binary security comparison on the two strings, and Case Sensitive * intstrcmp (stringstr1, stringstr2) * 2. common PHP string processing functions with no size difference
PHP string operations common functions
/*
* Determine the string length
* Int strlen (string str)
* Compare two strings
* 1. the strcmp function performs binary security comparison on two strings and is case sensitive.
* Int strcmp (string str1, string str2)
* 2. compare two strings in case-insensitive mode
* Int strcasecmp (string str1, string str2)
* 3. obtain the same part of the Two Strings.
* Int strspn (string str1, string str2)
* 4. find different parts of two strings
* Int strcspn (string str1, string str2)
* Process string case sensitivity
* 1. convert all strings to lowercase letters.
* String strtolower (string str)
* 2. convert all strings into uppercase letters.
* String strtoupper (string str)
* 3. capital the first character of the string
* String ucfirst (string str)
* 4. convert each word in the string into uppercase letters.
* String ucword (string str)
* String and HTML conversion
* 1. convert a linefeed to an HTML termination mark.
* String bl2br (string str)
* 2. Convert Special characters into wieldHTML equivalent form
* String htmlentities (string str [, int quote_style [, int charset])
* 3. use special HTML characters for other purposes
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.