代码使用子字符串过滤出这些文件。
长度参数指定了所需子字符串的长度。
The length argument specifies the length of the desired substring.
提取子字符串并操作字符串的多个部分。
函数地作用是:返回子字符串可以。
中缀索引将匹配在字符串内任意位置的子字符串。
The infix index would match substrings anywhere within the string.
参数指定返回的子字符串的最大数量。
A parameter specifies the maximum number of substrings to return.
函数的作用是:查找子字符串出现次数。
The substr_count() function counts the number of times a substring occurs in a string.
清单9.shell参数值的子字符串。
子字符串是输入字符串的零个或多个相邻字符串长度单元。
A substring is zero or more contiguous string length units of input string.
在图5中,已经指定字符串第一个字节的长度为1的子字符串。
In Figure 5, the substring of length 1 from the first byte of the string has been specified.
子序列中的字符与子字符串中的字符不同,它们不需要是连续的。
The characters in a subsequence, unlike those in a substring, do not need to be contiguous.
返回正则表达式搜索中第一个子字符串匹配项的位置。
Returns the position of the first substring match in a regular expression search.
返回带格式字符串的子字符串,也可以选择包含密码字符。
Returns a substring of the formatted string, optionally including password characters.
它可以创建任意长度的单词前缀索引和可变长度的中缀子字符串的索引。
It can create indexes of word prefixes of arbitrary length and indexes of infix substrings of varying lengths.
返回通过连接一个数组中包含的若干子字符串创建的字符串。
Returns a string created by joining a number of substrings contained in an array.
好的,一个普通的任务是判断给定的子字符串是否能在该值中任意处找到。
Well, one very common task is determining whether or not a given substring can be found anywhere within that value.
在一个文件中阅读,找到一个子字符串,并把它写出来一个目录。
Reading in a file, finding a substring, and writing it out to a catalog.
参数指定要返回子字符串的最大数量,以及是否返回空数组元素。
Parameters specify the maximum number of substrings to return and whether to return empty array elements.
下面的示例演示替换或移除指定字符串中的子字符串的各种方法。
The following example shows various ways to replace or remove substrings in a specified string.
你想搜索一个字符串,获取该子字符串匹配的起始位置或匹配值。
You need to search for a substring, and return either the starting position of the match or the matching value itself.
对于这些情形,可添加一条异常规则,将部件指示器处理为令牌中的子字符串。
For such cases, an exception rule can be added for processing part indicators as substrings in tokens.
cut属性指出是否在继续之前从请求URL中删除匹配的子字符串片段。
The cut attribute indicates whether to delete the matched substring segment from the request URL before proceeding.
这种形式的字符串截断非常简便,只需用冒号分开来指定起始字符和子字符串长度。
This form of string chopping can come in quite handy; simply specify the character to start from and the length of the substring, all separated by colons.
“*”是通配符,可用来支持子字符串匹配,比如 com.infoq.*.*。
The * character is used to indicate wildcards, and can be used to support substring matching as in com.infoq.*.*.
第一个参数是子字符串,第二个参数是搜索字符串,可选的起始位置可以提供作为第三个参数。
The first argument is the substring, the second argument is the search string, and an optional starting position can be supplied as a third argument.
搜索指定的子字符串,并返回整个源字符串内最后一个匹配项的从零开始的索引。
Searches for the specified character and returns the zero-based index of the last occurrence within the entire source string.
如前所述,contains函数实现子字符串匹配,因此对于以上查询返回true。
As previously mentioned, the contains function implements sub-string matching and therefore returns the value true for the above query.
当从原始的输入数据中提取字符串时,试着从原始字符串返回一个子字符串,而不是创建一份拷贝。
When extracting strings from a set of input data, try to return a substring of the original data, instead of creating a copy.
搜索执行从文本开始处开始的部分匹配,返回列表中第一个与指定的子字符串匹配的项。
The search performs a partial match starting from the beginning of the text, and returning the first item in the list that matches the specified substring.
即使在这样一小段脚本中,您也可以找到一些参数扩展,包括长度、子字符串、模式匹配和模式替换。
You'll recognize several parameter expansions, including length, substring, pattern matching, and pattern replacement in even this short piece of script.
应用推荐