PHP string processing functions

Source: Internet
Author: User
Tags crc32
Addcslashes -- add backslash escape characters to some characters in the string
Addslashes -- escape characters in a string in a specified way
Bin2hex -- convert binary data to hexadecimal Representation
Chr -- returns the ASCII code of a character.
Chunk_split -- Splits a string into small parts based on a certain character Length
Convert_cyr_string -- converts a Slavic character to another character.
Convert_uudecode -- decrypts a string
Convert_uuencode -- encrypt a string
Count_chars -- returns the character usage information in a string.
CRC32 -- calculate the CRC32 polynomial of a string
Crypt -- one-way hash encryption function
Explode -- convert a string into an array using a delimiter
Fprintf -- return data as required and directly write data to the Document Stream
Get_html_translation_table -- returns the HTML entity that can be converted.
Html_entity_decode -- the inverse function of the htmlentities () function, which converts an HTML object to a character
Htmlentities -- convert some characters in a string into HTML entities
Htmlspecialchars_decode -- the inverse function of the htmlspecialchars () function, which converts HTML objects to characters.
Htmlspecialchars -- converts some characters in a string to HTML entities
Implode -- convert an array into a string using a specific delimiter
Join -- convert an array into a string, alias of the implode () function
Levenshtein -- calculate the difference between two words
Localeconv -- get format definitions related to numbers
Ltrim -- removes white spaces or specified characters on the left of the string
Md5_file -- encrypt an object using the MD5 Algorithm
MD5-encrypt a string using the MD5 Algorithm
Metaphone -- determines the pronunciation rules of a string
Money_format -- format the output of numbers based on parameters
Nl_langinfo -- Query Language and local information
Nl2br -- replace the linefeed "\ n" in the string with "<br/>"
Number_format -- format the output of numbers based on parameters
Ord: converts an ascii code to a character.
Parse_str -- convert a string of a certain format to a variable and a value
Print -- used to output a separate value
Printf -- display data as required
Quoted_printable_decode -- encrypt a string into an 8-bit binary string
Quotemeta -- escape several specific characters
Rtrim -- remove the white space or specified characters on the right of the string
Setlocale -- set the local format of numbers, dates, and so on
Sha1_file -- encrypt a file using the sha1 Algorithm
Sha1 -- encrypt a string using the sha1 Algorithm
Similar_text -- compares two strings and returns the number of similar characters that the system considers.
Soundex-rules for determining the pronunciation of a string
Sprintf -- return data as required, but no output
Sscanf -- you can format strings.
Str_ireplace -- matches and replaces strings like the str_replace () function, but is case insensitive.
Str_pad -- pad both sides of the string
Str_repeat -- repeat the string
Str_replace -- match and replace strings
Str_rot13 -- encrypt the string with rot13
Str_shuffle -- random sorting of characters in a string
Str_split -- Splits a string into an Array Based on the Character Spacing
Str_word_count -- get the English word information in the string
Strcasecmp -- compare the string size, case insensitive
Strchr -- returns the alias of some strstr () functions of a string through comparison.
Strcmp -- compare the size of a string
Strcoll-compare the string Size Based on Local Settings
Strcspn -- returns the value of consecutive non-matching lengths.
Strip_tags -- remove the HTML and PHP code in a string
Stripcslashes -- returns the string processed by the addcslashes () function escape function.
Stripos -- locate and return the position of the first matching item. The matching is case insensitive.
Stripslashes -- returns the string that has been escaped by the implicit addslashes () function.
Stristr -- returns the part of a string through comparison. The comparison is case insensitive.
Strlen -- get the encoding length of a string
Strnatcasecmp -- use the natural sorting method to compare the string size, case insensitive
Strnatcmp -- use the natural sorting method to compare the string size
Strncasecmp-compare the size of the First n characters of a string, case insensitive
Strncmp -- compare the size of the First n characters of a string
Strpbrk -- returns the part of a string through comparison
Strpos -- locate and return the position of the first matching item
Strrchr -- returns the part of a string through comparison from the back to the back
Strrev -- reverse arrange all letters in the string
Strripos -- search from the back and return the position of the first matching item. The matching is case insensitive.
Strrpos -- search from the back and return the position of the first matching item
Strspns -- value that matches and returns the consecutive length of a character
Strstr -- returns the part of a string through comparison
Strtok -- use a specified number of characters to separate strings
Strtolower -- convert string to lowercase
Strtoupper -- converts a string to uppercase
Strtr -- replace string comparison
Substr_compare -- Comparison after string Truncation
Substr_count -- calculates the number of occurrences of a character segment in a string.
Substr_replace -- replace some characters in the string
Substr -- truncates a string
Trim -- removes spaces or specified characters on both sides of the string
Ucfirst -- converts the first letter of the given string into uppercase letters.
Ucwords -- converts the first letter of each English word of the given string into uppercase letters.
Vfprintf -- return data as required and directly write data to the Document Stream
Vprintf -- display data as required
Vsprintf -- return data as required, but no output
Wordwrap-Splits a string based on 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.