int codeUnitAt(int index) | 返回给定索引值的对应utf-16编码 |
int compareTo(String other) | 与传入字符串进行比拟,有雷同返回1,否则返回-1 |
bool contains(Pattern other, [int index]) | 查找返回字符串是否有符号要求的,传入index规定从index位开始查找 |
bool endsWith(String other) | 字符串的结尾是否为传入的值 |
int indexOf(Pattern other, [int start]) | 从字符串后面开始查找返回合乎规定的第一个的索引地位,传入start规定从哪里开始查找 |
int lastIndexOf(Pattern other, [int start]) | 与indexOf雷同,不同的是这个办法是从前面开始查找 |
String padLeft(int width, [String padding]) | 如果字符串没有width 的长度,则在后面加上padding 字符串并返回,不会扭转原字符串 |
String padRight(int width, [String padding]) | 同padLeft 办法雷同,不同的是从padding 加在前面 |
String replaceAll(Pattern from, String to) | 替换所有匹配的子字符串 |
String replaceAllMapped(Pattern from, String replace(match)) | 将匹配到的字符串用函数解决后返回字符串替换 |
String replaceFirst(Pattern from, String to, [int index]) | 替换第一个匹配的子字符串,能够规定从index 出开始匹配 |
String replaceFirstMapped(Pattern from, String replace(match), [int index]) | 同replaceAllMapped ,此办法只替换第一个匹配的值,能够规定从index 处开始匹配 |
String replaceRange(int start, int end, String to) | 替换范畴类的字符串 |
List<String> split(Pattern pattern) | 拆分字符串为数组 |
String splitMapJoin(Pattern pattern, { String onMatch(match), String onNonMatch(match) }) | 拆分替换字符串,匹配和不匹配的执行对应函数替换成返回值 |
bool startsWith(Pattern pattern, [int index]) | 是否是匹配的正则或字符串开始,能够规定从index 开始查找 |
String substring(int startIndex, [int endIndex]) | 提取字符串中startIndex (蕴含)到endIndex (不蕴含)两个指定的索引号之间的字符。 |
String toLowerCase() | 把字符串转换为小写 |
String toUpperCase() | 把字符串转换为大写 |
String trim() | 去除字符串两边的空白 |
String trimLeft() | 去除字符串右边的空白 |
String trimRight() | 去除字符串左边的空白 |