PHP String Handling functions

Source: Internet
Author: User
Tags chop crc32 crypt format definition rtrim strcmp strtok
PHP String Handling functions

Addcslashes? Adds a backslash escape character to a partial character inside a string
Addslashes? Escapes characters inside a string in the specified manner
Bin2Hex? Converts binary data to hexadecimal representation
Chop? alias function for RTrim ()
Chr? Returns the ASCII code of a character
Chunk_split? Splits a string into small pieces at a certain length of character
Convert_cyr_string? Convert Slavic characters to other characters
Convert_uudecode? Decrypt a string
Convert_uuencode? Encrypt a string
Count_chars? Returns the character usage information for a string
Crc32? Computes the Crc32 polynomial of a string
Crypt? One-way hash encryption function
Echo? Used to display some content
Explode? Converts a string into an array form with a separator
fprintf? Return data as required and write directly to the document stream
Get_html_translation_table? Returns the HTML entities that can be converted
Hebrev? Converts a Hebrew encoded string into visual text
Hebrevc? Converts a Hebrew encoded string into visual text
Html_entity_decode? Inverse of the htmlentities () function to convert HTML entities to characters
Htmlentities? Convert some characters in a string to HTML entities
Htmlspecialchars_decode the inverse of the htmlspecialchars () function to convert an HTML entity to a character
Htmlspecialchars? Convert some characters in a string to HTML entities
Implode? Converts an array to a string with a specific delimiter
Join? Converts an array to a string, an alias for the implode () function
Levenshtein? Calculate the difference size of two words
Localeconv? Get a number-related format definition
LTrim? Removes whitespace to the left of the string or the specified character
Md5_file? Encrypt a file with the MD5 algorithm
MD5? Encrypt a string with the MD5 algorithm
Metaphone? Judging the pronunciation rules of a string
Money_format? Output of numbers formatted according to parameters
Nl_langinfo? Querying language and local information
Nl2br? Replace the newline character "\ n" in the string with "

Number_format? Output of numbers formatted according to parameters
The Ord? Converts an ASCII code to one character
Parse_str? Convert a string of a certain format into a variable and a value
Print? Used to output a single value
Printf? Display the data as required
Quoted_printable_decode? Encrypts a string into a 8-bit binary string
Quotemeta? To escape a number of specific characters
RTrim? Removes whitespace to the right of the string or the specified character
SetLocale? Set local formats for numbers, dates, and so on
Sha1_file? Encrypt a file with the SHA1 algorithm
SHA1? Encrypt a string with the SHA1 algorithm
Similar_text? Compares two strings and returns the number of similar characters that the system considers
Soundex? Judging the pronunciation rules of a string
sprintf? Returns the data as required, but does not output
Sscanf? You can format a string
Str_ireplace? Match and replace strings like the Str_replace () function, but not case-sensitive
Str_pad? Padding on both sides of a string
Str_repeat? repeating combinations of strings
Str_replace? Matching and replacing strings
Str_rot13? ROT13 cryptographic processing of strings
Str_shuffle? Randomly sort the characters inside a string
Str_split? Splits a string into an array by character spacing
Str_word_count? Get the English word information inside the string
STRCASECMP? Size comparison of strings, case insensitive
Strchr? The alias of a part of the STRSTR () function that returns a string by comparison
strcmp? Size Comparison of strings
Strcoll? Size comparison of strings based on local settings
Strcspn? Returns the value of a character continuous non-matching length
Strip_tags? Remove HTML and PHP code from a string
Stripcslashes? Inverse literal addcslashes () function escapes processed strings
Stripos? Finds and returns the position of the first occurrence, matching is case insensitive
Stripslashes? Inverse literal addslashes () function escapes processed strings
Stristr? Returns a part of a string by comparison, case-insensitive comparison
Strlen? Gets the encoded length of a string
STRNATCASECMP? Size comparison of strings using natural sorting, case insensitive
STRNATCMP? Size comparison of strings using the natural sort method
STRNCASECMP? Size comparison of the first n characters of a string, case insensitive
STRNCMP? Size comparison of the first n characters of a string
Strpbrk? Returns the part of a string by comparison
Strpos? Find and return the position of the first occurrence
Strrchr? Returns the part of a string from a backward-forward comparison
Strrev? To reverse all the letters in a string
Strripos? Finds and returns the position of the first match from behind, matching is case-insensitive
Strrpos? Find and return the position of the first match from behind
Strspn? Matches and returns the value of the character continuous occurrence length
Strstr? Returns the part of a string by comparison
Strtok? Splits a string with a specified number of characters
Strtolower? Convert a string to lowercase
Strtoupper? Convert a string to uppercase
Strtr? To replace a string comparison
Substr_compare? Comparison of a string after it has been intercepted
Substr_count? Count occurrences of a character segment in a string
Substr_replace? Replace part of a character in a string
Substr? To intercept a string
Trim? Remove whitespace or specified characters on either side of a string
Ucfirst? Converts the first letter of a given string to uppercase
Ucwords? Capitalize the first letter of each English word given to a string
Vfprintf? Return data as required and write directly to the document stream
Vprintf? Display the data as required
Vsprintf? Returns the data as required, but does not output
WordWrap? Splits a string by a certain character length

Addcslashes? Adds a backslash escape character to a partial character inside a string
Addslashes? Escapes characters inside a string in the specified manner
Bin2Hex? Converts binary data to hexadecimal representation
Chop? alias function for RTrim ()
Chr? Returns the ASCII code of a character
Chunk_split? Splits a string into small pieces at a certain length of character
Convert_cyr_string? Convert Slavic characters to other characters
Convert_uudecode? Decrypt a string
Convert_uuencode? Encrypt a string
Count_chars? Returns the character usage information for a string
Crc32? Computes the Crc32 polynomial of a string
Crypt? One-way hash encryption function
Echo? Used to display some content
Explode? Converts a string into an array form with a separator
fprintf? Return data as required and write directly to the document stream
Get_html_translation_table? Returns the HTML entities that can be converted
Hebrev? Converts a Hebrew encoded string into visual text
Hebrevc? Converts a Hebrew encoded string into visual text
Html_entity_decode? Inverse of the htmlentities () function to convert HTML entities to characters
Htmlentities? Convert some characters in a string to HTML entities
Htmlspecialchars_decode the inverse of the htmlspecialchars () function to convert an HTML entity to a character
Htmlspecialchars? Convert some characters in a string to HTML entities
Implode? Converts an array to a string with a specific delimiter
Join? Converts an array to a string, an alias for the implode () function
Levenshtein? Calculate the difference size of two words
Localeconv? Get a number-related format definition
LTrim? Removes whitespace to the left of the string or the specified character
Md5_file? Encrypt a file with the MD5 algorithm
MD5? Encrypt a string with the MD5 algorithm
Metaphone? Judging the pronunciation rules of a string
Money_format? Output of numbers formatted according to parameters
Nl_langinfo? Querying language and local information
Nl2br? Replace the newline character "\ n" in the string with "

Number_format? Output of numbers formatted according to parameters
The Ord? Converts an ASCII code to one character
Parse_str? Convert a string of a certain format into a variable and a value
Print? Used to output a single value
Printf? Display the data as required
Quoted_printable_decode? Encrypts a string into a 8-bit binary string
Quotemeta? To escape a number of specific characters
RTrim? Removes whitespace to the right of the string or the specified character
SetLocale? Set local formats for numbers, dates, and so on
Sha1_file? Encrypt a file with the SHA1 algorithm
SHA1? Encrypt a string with the SHA1 algorithm
Similar_text? Compares two strings and returns the number of similar characters that the system considers
Soundex? Judging the pronunciation rules of a string
sprintf? Returns the data as required, but does not output
Sscanf? You can format a string
Str_ireplace? Match and replace strings like the Str_replace () function, but not case-sensitive
Str_pad? Padding on both sides of a string
Str_repeat? repeating combinations of strings
Str_replace? Matching and replacing strings
Str_rot13? ROT13 cryptographic processing of strings
Str_shuffle? Randomly sort the characters inside a string
Str_split? Splits a string into an array by character spacing
Str_word_count? Get the English word information inside the string
STRCASECMP? Size comparison of strings, case insensitive
Strchr? The alias of a part of the STRSTR () function that returns a string by comparison
strcmp? Size Comparison of strings
Strcoll? Size comparison of strings based on local settings
Strcspn? Returns the value of a character continuous non-matching length
Strip_tags? Remove HTML and PHP code from a string
Stripcslashes? Inverse literal addcslashes () function escapes processed strings
Stripos? Finds and returns the position of the first occurrence, matching is case insensitive
Stripslashes? Inverse literal addslashes () function escapes processed strings
Stristr? Returns a part of a string by comparison, case-insensitive comparison
Strlen? Gets the encoded length of a string
STRNATCASECMP? Size comparison of strings using natural sorting, case insensitive
STRNATCMP? Size comparison of strings using the natural sort method
STRNCASECMP? Size comparison of the first n characters of a string, case insensitive
STRNCMP? Size comparison of the first n characters of a string
Strpbrk? Returns the part of a string by comparison
Strpos? Find and return the position of the first occurrence
Strrchr? Returns the part of a string from a backward-forward comparison
Strrev? To reverse all the letters in a string
Strripos? Finds and returns the position of the first match from behind, matching is case-insensitive
Strrpos? Find and return the position of the first match from behind
Strspn? Matches and returns the value of the character continuous occurrence length
Strstr? Returns the part of a string by comparison
Strtok? Splits a string with a specified number of characters
Strtolower? Convert a string to lowercase
Strtoupper? Convert a string to uppercase
Strtr? To replace a string comparison
Substr_compare? Comparison of a string after it has been intercepted
Substr_count? Count occurrences of a character segment in a string
Substr_replace? Replace part of a character in a string
Substr? To intercept a string
Trim? Remove whitespace or specified characters on either side of a string
Ucfirst? Converts the first letter of a given string to uppercase
Ucwords? Capitalize the first letter of each English word given to a string
Vfprintf? Return data as required and write directly to the document stream
Vprintf? Display the data as required
Vsprintf? Returns the data as required, but does not output
WordWrap? Splits a string by a certain character length

  • Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.