The examples in this article describe MySQL interception and split string function usage. Share to everyone for your reference, specific as follows:
First of all, intercept String functions:
SUBSTRING (commentid,9)
This is very
1, the interception of GB2312 characters used in the function
PHP code
Copy Code code as follows:
Intercepting Chinese strings
function Mysubstr ($str, $start, $len) {
$tmpstr = "";
$strlen = $start + $len;
for ($i = 0; $i if
For operations on string positions, the first position is marked as 1.
ASCII(str)
Returns the str ASCII code value of the leftmost character of the string. If
str It is an empty string, return
0 . If
str Yes
Sometimes in the project we need to use PHP to encrypt specific information, that is, through the encryption algorithm to generate an encrypted string, the encrypted string can be decrypted by decryption algorithm to facilitate the process of
Substr
An intercept string function in Oracle.
The syntax is as follows:
substr (String, start_position, [length])
Parameter analysis:
String
String value
Start_position
Intercepts the initial position of the string,
Common built-in functions awk built-in string function
Gsub (R,s) replaces R with s in the entire $
Gsub (R,S,T) replaces R in the whole T with S
Index (S,T) returns the first position of the string T in S
Length (s) returns s
Match (S,R) test s
1. Intercept string from leftLeft (str, length)Description: Left (truncated field, intercept length)Example: Select Left (content,200) as abstract from my_content_t2, starting from the right to intercept the stringRight (str, length)Description:
The first position of a string is labeled 1
ASCII (STR): Returns the ASCII code value of the leftmost character
CONV (N, From_base, to_base): Converts a number between different cardinality, returns a string number of number N, or null
1. Intercept string from leftLeft (str, length)Description: Left (truncated field, intercept length)Example: Select Left (content,200) as abstract from my_content_t2, starting from the right to intercept the stringRight (str, length)Description:
Database functionOne, built-in functions -- String Functions1 、--ASCII ASCII encoding of the first letter of the returned stringSelect ASCII (' ame ')Format in select ASCII (xingming) from xuesheng-- query statementsselect*from haha where ASCII
For operations on string positions, the first position is marked as 1.
ASCII(str)
Returns the str ASCII code value of the leftmost character of the string. If
str It is an empty string, return
0 . If
First, common String functions:
1. Char_length Gets the length (in characters)
2. Format formatted
3, insert replace the way inserted
4. INSTR Get Location
5, Left/right take left, take right
6. Length Gets the lengths
1. Length of the string 2. Case conversion
(1) Turn all lowercase
(2) Full capitalization
3. Go to Space
(1) Go to left space
(2) Go to the right space
(3) Go to both sides of the space
The String extension method has been very busy and has no time to write your own things. But it is not a taste to watch the day without updating your mood. You only have to collect some good stuff from the Internet.
/*** Delete spaces at the
Share string functions of SQL interceptions. For more information, see. Very good application.
Share string functions of SQL interceptions. For more information, see. Very good application.
A. truncates N characters from the left of the
1) edit the directory of this segment in strcat
Char * strcat (char * To, const char * From ); Function:Link two strings.
Example: In this example, use the strcat link string cheers_lee and @ hotmail.com.
The script is as follows: Char test [102
Http://cache.baidu.com/C? M = queue & P = 882a9643d58512a05beace375744cf20 & newp = queue & User = Baidu & fm = SC & query = Python + partition & qid = ff4e5bcf244c9d94 & p1 = 2
Added a new Partition Function in version 2.5. What can it do? Here
Bind the function of printing strings on the screen as a function. For future use.; Helloworld. ASM
Org 07c00h; Setup stack. Setup stack at most top of 640 KStart: mov ax, 0x0fc0MoV SS, axMoV ax, 0x0400MoV sp, ax
MoV BX, msg1Push BXCall dumpstrPop
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.