decimal value of the N1, N2 the default is set to 0, when N2 is the default setting N1 truncated to an integer, if the N2 is negative, it is truncated in the corresponding bit to the left of the decimal point.For example: SELECT TRUNC (23.56), TRUNC (23.56,1), TRUNC (23.56,-1) from DUAL;(ii). Character functions return character values (Character Functions returning Character values)The class function retu
value of a character (Character functions returning Character values)
The class function returns the same type as the input type.
The returned char type value is no longer than 2000 bytes;
The returned VCHAR2 type value is not longer than 4000 bytes;
If the length of the character that should be returned above is exceeded, Oracle will not make an error but directly truncate to the maximum supporting length return.
The returned CLOB type value
Length-Constrained string functions : This function takes a display length as a parameter to limit the number of characters to compare or copy, preventing some long strings from spilling from the target array. The most common restricted string functions in three:char * strncpy (char *dst,char const *src,size_t len);str
R language-string processing functions, string functionsNchar
Function for retrieving the number of charactersDifferent from nchar, length is the length of the orientation.
# Nchar indicates the number of characters in the string. nchar ("abcd") [1] 4 # length indicates the number of elements in the vector. length ("ab
Stringimplode (string $ glue, array $ pieces) function: implode nbsp; mdash; nbsp; converts the value of a one-dimensional array to a string description: concatenate the values of one-dimensional arrays into a string using glue. join is an alias function of implode. the two functions are exactly the same. Parameter:
oracle| Function | conversion | String Oracle Common numerical functions, conversion functions, string functions introduced.
numeric function:
Absolute value of ABS (m) m
MoD (M,n) m is the remainder after the n is removed
Power (M,n) m's n-th-side
Round (M[,n]) m rounded to
expressionMin ([distinct/All] n) minimum value of the column or expressionSTDev ([distinct/All] n) Standard deviation of this column or expression, ignoring null valuesSum ([distinct/All] n) sum of the column or expressionVariance ([distinct/All] n) variance of the column or expression, ignoring null values
--------------------------------------------------------------------------------
Date functions:>
Add_months (d, n)Date D plus N monthsLast_day (
The SUBSTR function can reduce the string to fewer strings
The swap function can exchange two of strings of content
The Max_size function can exchange two of strings of content
The Getline function can store input data into a container through an input device
The swap function can exchange the contents of two data strings
String functions
Str...
single-record functions in SQL
1.ASCII
Returns the decimal number corresponding to the specified character;
Sql> Select ASCII (' a ') a,ascii (' A ') a,ascii (' 0 ') zero,ascii (') space from dual;
A A ZERO space
--------- --------- --------- ---------
65 97 48 32
2.CHR
Give an integer and return the corresponding character;
Sql> Select Chr (54740) ZHAO,CHR () chr65 from dual;
En C
-- -
Zhao A
3.CONCAT
Connect two strings;
Sql> Select Concat (' 010-
Common string operation functions in PHP development, and string functions in php development. Common string operation functions in PHP Development. string function 1 in php Development
Write a function reverse_string (char * string) (Recursive implementation)//implementation: The characters in the parameter string are arranged in reverse order. Requirement: You cannot use the string manipulation function in the C function library. #include The C language writes a function reverse_string (char * string
the string s.g) string S (num,c)//Generate a string containing num C charactersh) string S (beg,end)//The initial value of the string s as a character in the interval beg;end (not including end)i) s.~string ()//Destroy all charac
This article mainly introduces some string operation functions in PHP that can replace regular expression functions. This article summarizes some special string operation functions. For more information, see
0x01: perform lexical analysis on strings based on predefined chara
)function: Returns a string that replaces each character in the appearing from_str with the corresponding character in To_str. Translate is a superset of the functionality provided by replace. If FROM_STR is longer than TO_STR, the characters in From_str and not in To_str are removed from the string because they do not have the corresponding substitution characters. To_str cannot be empty. Oracle considers
appears for the first time in the string, and returns the first index value, for example:Str1.indexof ("word"); // search for the index value (location) of the word in str1)Str1.indexof ("string"); // search for the index value (location) of the first character of "string" in str1)Str1.indexof ("string", 4th); // quer
PHP Class 8 common functions for string splitting and php string splitting
Course Overview:
This lesson allows you to perform basic operations on strings.
String knowledge point:1. Introduction to string processing2. Common string
MySQL string functions (recommended) and mysql Functions
I. ASCII
ASCII (str)
Returns the ASCII code value of the leftmost character of the str string. If str is a Null String, 0 is returned. If 'str' is NULL, return NULL.
2. ORD
ORD (str)
If the leftmost character of a
Label: Style Color Io OS AR for strong sp
Common string processing functions used for development:Strtr () is a special character in the conversion string.Substr () returns part of the string.Strstr () first appearance of a string in another string (case sensitive)Str_replace () replaces some characters in the
String functions in MySQL
Function
Function
CONCAT (s1,s2,... sn)
Connect S1,s1...sn to a string
INSERT (STR,X,Y,INSTR)
The string str starts at the x position, and the substring of y characters is replaced with the string
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.