xlang v4.0 Release
程序设计语言基础库文档
载入中...
搜索中...
未找到
StringBuffer.xcs
浏览该文件的文档.
1
6@Declare
7final class StringBuffer{
12
17 StringBuffer(byte[] data);
18
23 StringBuffer(int Capacity);
24
31 StringBuffer(byte[] data, int offset, int length);
32
33
39 StringBuffer(char[] data, bool bLittleEndian);
40
48 StringBuffer(char[] data, int offset, int length, bool bLittleEndian);
49
50
57
65 StringBuffer(byte[] data, int offset, int length, String charset);
66
72
73
78 int length();
79
85 int find(String sub);
86
94 int find(String sub, int offset, int length);
95
96
103 String substring(int start, int end);
104
110
111
118
124 String[] split(char dim);
125
131 StringBuffer operator += (byte two);
132
138 StringBuffer operator += (int two);
139
145 StringBuffer operator += (char two);
146
152 StringBuffer operator += (long two);
153
159 StringBuffer operator += (bool two);
160
166 StringBuffer operator += (double two);
167
173 StringBuffer operator += (String two);
174
175
181 bool startsWith(String sub);
182
183
189 bool endsWith(String sub);
190
197 int indexOf(String sub, int pos);
198
199
206 int indexOf(char c, int pos);
207
208
215 int lastIndexOf(String sub, int pos);
216
217
224 int lastIndexOf(char sub, int pos);
225
232
239
246 StringBuffer insert(int pos, String sub);
247
254 StringBuffer insert(int pos, char sub);
255
260 byte[] getBytes();
261
268
274 byte[] toCharArray(bool bLittleEndian);
275
280 bool isDigit();
281
286 long parseLong();
287
292 long parseHex();
293
298 int parseInt();
299
304 bool parseBool();
305
310 double parseDouble();
311
316 float parseFloat();
317
325 StringBuffer replace(int start, int end, String sub);
326
334
340
346
352 bool equals(String other);
353
360
366 int countChar(char c);
367
374
381
388
395 StringBuffer formatPath(String str, bool bReslash);
396
403
410
417
424
430
437
444
450
456
462
468
474
480
485 bool isDot();
486
494 StringBuffer toRelativePath(String refPath,bool ignoreCase,bool correct_slash);
495
502
503
508 char charAt(int pos);
509
515
520 StringBuffer encodeURI(bool bComponent);
521
527
533
538 int compare(String other);
539
544 int capacity();
545
551
557
564 StringBuffer append(byte[] data, int offset, int length);
565
573 StringBuffer append(char[] data, int offset, int length, bool bLittleEndian);
574
580
586};
字符串缓冲类
int find(String)
int compare(String other)
比较字符串
StringBuffer append(String sub)
连接对象并产生新串
byte [] toCharArray(bool bLittleEndian)
获取串的char数组(UTF16)内容
StringBuffer(byte[] data, int offset, int length, String charset)
从byte数组构造对象
long parseHex()
解析为十六进制long对象
StringBuffer removeExtension()
当串为文件名时,删除扩展名 并生成新串
StringBuffer trim(bool bc)
去除串两端的空白字符 并生成新串
float parseFloat()
解析为float对象
StringBuffer lower()
转换为小写 生成一个新串
StringBuffer append(char[] data, int offset, int length, bool bLittleEndian)
增加数据
StringBuffer formatPath(String str, bool bReslash)
格式化路径 该方法将消除路径中的 // /./ /../ 以及其他不正确的斜杠和反斜杠
String substring(int start, int end)
在串中截取子串
StringBuffer(String text)
从String构造对象
int indexOf(String sub, int pos)
从串的前面查找另一个穿的位置
String charset()
bool isDigit()
测试串是否数字
String [] split(String dim)
在串中截取子串
int countChar(char c)
统计字符串中字符出现的次数
StringBuffer appendFill(char c, int length)
构造一个全以字符c组成的长度为length的字符串
StringBuffer insert(int pos, char sub)
在串的指定位置插入一个字符,并生成新串
bool equals(String other)
测试两个串是否相等
StringBuffer resizeCapacity(int other)
重设容量
StringBuffer replace(String find,String rep)
在串中查找子串并替换为另一个串
bool endsWith(String sub)
测试串是否由另一个字串结尾
long parseLong()
解析为long对象
int countString(String str)
统计字符串中另一个串出现的次数
StringBuffer replace(int start, int end, String sub)
将串中指定的部分替换为另一个串
StringBuffer append(byte[] data, int offset, int length)
增加数据
StringBuffer insert(int pos, String sub)
在串的指定位置插入一个新串,并生成新串
StringBuffer appendPath(String str)
连接路径,该方法会按照平台使用不同的\的/来连接路径串
String findVolumePath()
当串为文件名时,寻找卷名与路径名 并生成新串
StringBuffer toAbsolutePath(String refPath)
转换到绝对路径
int indexOf(char c, int pos)
从串的前面查找一个字符的位置
int lastIndexOf(char sub, int pos)
从串的后面查找一个字符的位置
StringBuffer(char[] data, int offset, int length, bool bLittleEndian)
从Char数组(UTF16)构造对象
byte [] getBytes(String charset)
获取串的byte数组内容
StringBuffer(char[] data, bool bLittleEndian)
从Char数组(UTF16)构造对象
String [] split(char dim)
在串中截取子串
int countStringIgnoreCase(String str)
统计字符串中另一个串(忽略大小写)出现的次数
int find(String sub)
在串中查找子串
StringBuffer decodeURI()
将URI转换为字符串
double parseDouble()
解析为double对象
int lastIndexOf(String sub, int pos)
从串的后面查找另一个穿的位置
bool isDot()
当串为文件名时,测试串是否为. 或者..
StringBuffer replaceFilenameAndExtension(String newExtName)
当串为文件名时,替换文件名与扩展名 并生成新串
String findFilenameAndExtension()
当串为文件名时,寻找文件名与扩展名 并生成新串
StringBuffer encodeURI(bool bComponent)
转换为URI
StringBuffer()
默认构造
String findPathFilename()
当串为文件名时,寻找路径和文件名 并生成新串
StringBuffer rtrim(bool bc)
去除串右端的空白字符 并生成新串
StringBuffer append(char sub)
连接对象并产生新串
StringBuffer(byte[] data)
从byte数组构造对象
StringBuffer(byte[] data, int offset, int length)
从byte数组构造对象
int find(String sub, int offset, int length)
在串中查找子串
String parseMarkdown()
将一个markdown字符串转换为HTML字符串
String toString()
转到字符串
StringBuffer ltrim(bool bc)
去除串左端的空白字符 并生成新串
bool parseBool()
解析为bool对象
StringBuffer upper()
转换为大写 生成一个新串
StringBuffer replaceFilename(String newName)
当串为文件名时,替换文件名(保留扩展名) 并生成新串
int capacity()
获取容量
String findVolume()
当串为文件名时,寻找卷名(限WINDOWS) 并生成新串
StringBuffer(int Capacity)
构造默认容量的对象
String findFilename()
当串为文件名时,寻找文件名 并生成新串
StringBuffer clear()
清空内容
String findExtension()
当串为文件名时,寻找扩展名 并生成新串
char charAt(int pos)
获取字符串指定位置的字符
StringBuffer(byte[] data, String charset)
从byte数组构造对象
StringBuffer escape()
消除串中的转义字符 并返回一个新串
StringBuffer toRelativePath(String refPath,bool ignoreCase,bool correct_slash)
转换到相对路径
StringBuffer replaceExtension(String newExtName)
当串为文件名时,替换扩展名 并生成新串
bool equalsIgnoreCase(String other)
忽略大小写并比较两个串是否相等
byte [] getBytes()
获取串的byte数组内容
bool startsWith(String sub)
测试串是否由另一个字串起始
int parseInt()
解析为int对象
字符串类