首先,我先做一个检查,我们以前使用过字符串长度函数。
First, I'm going to do a sanity check strlen so we've used string length, strlen, before.
可以指定一个可选的字符串长度单元来指明在哪些单元中表示函数的起始位置和结果。
An optional string length unit can be specified to indicate in what units the start and result of the function are expressed.
除了输入字符串之外,SUBSTRING函数还有其他三个参数,它们分别是:起始位置、长度和代码单元指定。
Along with the input string, the SUBSTRING function has three other arguments, which are start position, length, and code unit specification.
如果使用CODEUNITS来获取字符的长度,则用作字符串函数输入的CODEUNITS的不同会导致输出的不同。
If you take the length of a character in CODEUNITS, the output differs according to the CODEUNITS used as inputs to the string function.
如SQL标准中所述,此函数使用字符语义查找字符字符串的长度。
This function, as mentioned in SQL standards, is used to find the length of a character string in character semantics.
如SQL标准中所述,此函数返回输入字符串的八位字节长度或字节长度。
This function, as mentioned in SQL standard, returns the length of the input string in octets or bytes.
strncpy _ from_user函数将一个字符串从用户空间复制到一个内核缓冲区,给定一个用户空间源地址和最大长度。
The strncpy_from_user function copies a string from user space into a kernel buffer, given a user space source address and Max length.
还可以使用string函数来报告字符串属性,如子串的长度或位置,例如
You can also use string functions to report string attributes such as length or position of a sub-string, for example
若要 tokenize(也就是说,将一行拆分为单词长度的片段)某个字符串,请使用split()函数。
To tokenize (that is, split a line into word-length pieces) a string, use the split() function.
一些函数的输入是数值,比如字符串函数的起始、长度和偏移量参数。
For some functions, a numeric value is input, for example start, length, and offset parameters of string functions.
如果采用特殊编码的某个字符的长度跨越了多个字节,则基于字符的字符串函数可以将每个字符处理为一个单元而不是一个字节序列。
If a character in a particular encoding spans multiple bytes, the character-based string functions can process each character as a single unit as opposed to a sequence of bytes.
在很多情形下,您需要根据代码单元计算的字符串长度,可以使用基于字符的函数来获取根据字符串单元计算的字符串长度。
In many situations, you need the string length in terms of code units, the character-based functions could be used to find the length of the string in terms of string units.
此函数与DB2 中的LENGTH 函数类似,并拥有一个可选的字符串长度单元,可以用来表示结果。
This function is similar to the LENGTH function in DB2 and has an optional string length unit, in which the result can be expressed.
使用基于字符的字符串函数可以解决获取基于CODEUNITS的字符串长度时的问题。
The character-based string functions can be used to solve the problem of getting the length of string in terms of CODEUNITS.
字符串变量的长度:substr函数的输入参数,决定了结果字符串的期望长度或length函数的输出。
Length of a string variable: Input argument for the SUBSTR function, which determines the desired length of the resulting string or output of the length function.
如果参数是空序列,fn:string (seq)将返回长度为零的字符串,另一个函数则返回空白序列。
If the argument is an empty sequence, fn: string (seq) will return a zero-length string, but the other function returns an empty sequence.
md5()函数可以散列反馈的任何字符串,并将其转变为固定长度为 32 个字符的字符串。
The md5() function hashes whatever string is fed to it and turns it into a 32-character fixed-length string.
长度大于0的字符串在解析为Boolean函数时,总是被判断为True,即使它的值是字符串'false '时亦是如此。
A string whose length is greater than zero is always evaluated as True when resolved to a Boolean function, even if its value is the string 'false'.
使用字符串函数长度检查较为频密。
当合并字符串的长度和数量增加之后,有些函数开始显示出自己的威力。
As the length and number of strings that must be merged increases, however, some methods start to show their strength.
这个函数将返回写入的字符串长度;如果执行失败将返回False。
This function returns the length of the written string, or FALSE on failure.
函数将返回书写的字符串长度。
The fprintf() function returns the length of the written string.
通常,一种有用的方法是,向“计数字符串”函数传递比缓冲区大小小一的长度,然后将零显式赋给缓冲区中的最后一个字符。
In general, one useful approach is to pass a length to the 'counted string' function one smaller than the size of the buffer and then explicitly assign zero to the last character in the buffer.
子函数允许任意长度的被加数,被加数和结果都是字符串,可以直接输出。
Subroutine allow arbitrary length summand, summand, and the result is a string, you can output directly.
当操作字符串并需要检验其长度是否满足某种要求时,你想当然地会使用strlen函数。
When working with strings and you need to check that the string is either of a certain length you'd understandably would want to use the strlen function.
构造函数可以验证正在接受验证的字符串可接受的最小长度。
Constructor verifies the minimum acceptable length of the string being validated.
构造函数可以验证正在接受验证的字符串可接受的最小长度。
Constructor verifies the minimum acceptable length of the string being validated.
应用推荐