## Dart编程实例 - dart字符串属性 length```dartvoid main() { String str = Hello All; print(The length of the string is: ${str.length});}```
## Dart编程实例 - 字符串 toLowerCase() 方法```dartvoid main() { String uStr = ABC; String lStr = hello; print(uStr.toLowerCase()); print(lStr.toLowerCase());}```
## Dart编程实例 - 字符串 toUpperCase() 方法```dartvoid main() { String uStr = ABC; String lStr = hello; print(uStr.toLowerCase()); print(lStr.toLowerCase());}```
## Dart编程实例 - 字符串 trim() 方法```dartvoid main() { String str1 = hello; String str2 = hello world; String str3 = hello; print(str1.trim()); print(str2.trim());
## Dart编程实例 - 字符串 compareTo() 方法```dartvoid main() { String str1 = A; String str2 = A; String str3 = B; print(str1.compareTo(str2): ${str1.compareTo(str2)});
## Dart编程实例 - 字符串 replaceAll() 方法```dartvoid main() { String str1 = Hello World; print(New String: ${str1.replaceAll(World,ALL)});}```
## Dart编程实例 - 字符串 split() 方法```dartvoid main() { String str1 = Today, is, Thursday; print(New String: ${str1.split(,)});}```
## Dart编程实例 - 字符串substring 方法```dartvoid main() { String str1 = Hello World; print(New String: ${str1.substring(6)}); // from index 6 to the last index print(New Str
## Dart编程实例 - 字符串 toString 方法```dartvoid main() { int n = 12; var res = n.toString(); print(New String: ${res});}```
## Dart编程实例 - 字符串 codeUnitAt 方法```dartvoid main() { var res = Good Day; print(Code Unit of index 0 (G): ${res.codeUnitAt(0)}); }```