Photoshop CS5 official Chinese official version download PHP chinese processing function collection

Source: Internet
Author: User
---space---
String Gbspace (String)---------spaces between each text
String Gbunspace (String)-------white space between each text
String Clear_space (String)-------used to clear extra spaces
---conversion---
String gbcase (String,offset)---Converts the Chinese and English characters inside a string into uppercase and lowercase
Offset: "Upper"-string full capitalization (Strtoupper)
"Lower"-full string converted to lowercase (strtolower)
"Ucwords"-capitalize the first letter of each word of the string (ucwords)
"Ucfirst"-capitalizes the first letter of the string (Ucfirst)
String Gbrev (String)-----------upside down strings
---text check---
int Gb_check (string)-----------Check if there is a GB word inside the string, there will be a return of true,
Otherwise it will return false
int Gb_all (string)-------------check if all the words in the string have a GB word, it will return true.
Otherwise it will return false
int Gb_non (string)-------------check that all the words inside the string are not gigabytes, and that it returns true.
Otherwise it will return false
int Gblen (String)--------------returns the length of the string (only one letter in Chinese text)
---find, replace, extract---
Int/array Gbpos (Haystack,needle,[offset])----Find string (Strpos)
Offset: Empty-finds the first occurrence of the position
INT-the first position to be searched by the location
"R"-Find the last occurrence (Strrpos)
"A"-stores all found words in an array (returns an array)
String Gb_replace (Needle,str,haystack)--Find and replace string (str_replace)
String Gb_replace_i (Needle,str_f,str_b,haystack)--Do not check case lookup vs. replace string
Needle-Find letters
STR-Substituted letter (Str_f-Before the letter, str_b the letter)
Haystack-string
String Gbsubstr (String,start,[length])-Extracts from a string from start to end or length
The length of the string.
The Chinese text only counts one letter and can use positive negative numbers.
String Gbstrnear (string,length)-extracts the string closest to length from a string.
Length in Chinese characters 2 letters.
---note---
If you use the string returned by the Form, precede the string with stripslashes (), removing the redundant \.
To use: In the original PHP code, add:
Include ("Gb.inc");
You can use the above tool functions.
*/
Copy PHP content to clipboard
function Gblen ($string) {
$l = strlen ($string);
$ptr = 0;
$a = 0;
while ($a < $l) {
$ch = substr ($string, $a, 1);
$ch 2 = substr ($string, $a +1,1);
if (Ord ($ch) >= hexdec ("0x81") && Ord ($ch 2) >= hexdec ("0x40")) {
$ptr + +;
$a + = 2;
} else {
$ptr + +;
$a + +;
}//END IF
}//END WHI?
?>

The above is the introduction of the official Chinese version of photoshop cs5 download php chinese processing function collection, including the official Chinese official version of Photoshop CS5 download content, I hope the PHP tutorial interested in a friend helpful.

  • Related Article

    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.