PHP extension text processing-string and string functions are all string functions processed in various ways. There are also some special chapters in the regular expression and URL processing sections.
For more information about the operating
addcslashes-using backslashes to escape characters in a string in C language style
addslashes-referencing strings with backslashes
bin2hex-converts binary data to hexadecimal notation
Aliases for Chop-rtrim
chr-returns the
Mysql string processing functions
ASCII (char) returns the ASCII value of a character
BIT_LENGTH (str) returns the bit length of the string.
CONCAT (s1, s2 ..., Sn) replace s1, s2 ..., Connect the sn to a string
CONCAT_WS (sep, s1, s2 ..., Sn)
1. Aggregate Function AVG returns the average value of the group's values. NULL values are ignored. binary_checksum returns the binary check value calculated for the list of rows or expressions in the table. Binary_checksum can be used to detect
1. Add the AddcSlashes string to the backslashSyntax: string addcslashes (string str, string charlist );2. Add the AddSlashes string to the backslashSyntax: string addslashes (string str );Add a backslash ('), ", \, or NULL before a specific
PHP Learning Series (1) -- string processing functions (4), php Functions
16. The hebrevc () function switches the flow of Hebrew text from right to left to the flow from left to right. It also converts the new line (\ n) to . Only ASCII characters
Considerations for mysql programming and common string processing functions1) an SQL error is reported when a stored procedure is created (have an error in your SQL syntax ;....)Before you create a PROCEDURE or another type process, add delimiter //
Single-record functions in SQL1. ASCIIReturns the decimal number corresponding to the specified character;SQL> select ascii ('A') A, ascii ('A') A, ascii ('0') zero, ascii ('') space from dual;A ZERO SPACE------------------------------------65 97 48
function
Description
Addcslashes ()
Returns a string that adds a backslash before the specified character.
Addslashes ()
Returns a string that adds a backslash before a predefined character.
With a simple understanding of the PHP data type in the previous article, we know the string type, this article will introduce the string functions commonly used in PHP.The string is a sequence of characters, such as "Hello world!".PHP String
String functions1.ASCII (str)Returns the ASCII value of the first character of the string str (str is empty when the string returns 0)SELECT ASCII (' 2 ');->502.ORD (str)If the string str first is a single byte, returns the same value as the ASCII ()
As shown below:
Copy Code code as follows:
The Usleep () function delays code execution for several microseconds.
The unpack () function unpack the data from a binary string.
The Uniqid () function generates a unique ID based on the
The general To_char is such a to_char (Sysdate, ' yyyy-mm-dd hh:mi:ss am '), and there are several points of use for the book
To_char (sysdate, ' DD ') see what date it is today
To_char (sysdate, ' ww ') view this is the first few weeks of the
A function is a program that has 0 or more parameters and has a return value. In SQL, Oracle builds a series of functions that can be called SQL or PL/SQL statements, and functions are divided into two main classes: Single-line functions, group
For example, all of the following are examples of studnet tables:Calculating string LengthsLen () is used to calculate the length of a stringSelect Sname, Len (sname) from studentConvert string to large, lowercaseLower () is used to convert a string
Single-record functions in SQL1.ASCIIReturns the decimal number corresponding to the specified character (note: is a character rather than a string);Sql> Select ASCII (' a ') a,ascii (' A ') a,ascii (' 0 ') zero,ascii (') space from dual;A A ZERO
The usual functions in SQL drip 30-sqlThis article is reproduced from http://www.cnblogs.com/jiajiayuan/archive/2011/06/16/2082488.htmlOther people's summary, very detailed.For example, all of the following are examples of studnet tables:Calculating
Text: string manipulation in SQL Drip 33-sqlCalculating string LengthsLen () is used to calculate the length of a stringSelect sname,len from studentConvert string to large, lowercaseLower () is used to convert a string to lowercase, and upper () is
Concat is used to splice strings, such as Select Concat (RTrim (Vend_name), ' (', RTrim (vend_country), ') ') from vendors;Where RTrim is used to remove the right side of the space, concat in multiple strings, connected.In addition, it is usually
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.