当从原始的输入数据中提取字符串时,试着从原始字符串返回一个子字符串,而不是创建一份拷贝。
When extracting strings from a set of input data, try to return a substring of the original data, instead of creating a copy.
LOCATE LOCATE (' beach ',p. d escription)返回一个子字符串在搜索字符串中第一次出现的起始位置,如果没找到子字符串,则返回0。
LOCATE LOCATE (' beach ', p.description) Returns the starting location for the first occurrence of a substring in a search string, or zero if the substring isn't found.
然后,split方法返回一个数组,其中保存了根据空格字符将给定字符串分割成子字符串的结果。
The split method then returns an array holding the strings that resulted from separating the given string into substrings, as delimited by the space character.
应用推荐