| 1 |
str: the quick brown fox jumped over the lazy dog |
| 2 |
str.charAt( 0 ): 116 |
| 3 |
str.charAt( 10 ): 98 |
| 4 |
str.setCharAt( 0, 'T' ): The quick brown fox jumped over the lazy dog |
| 5 |
str.substring( 10 ): brown fox jumped over the lazy dog |
| 6 |
str.substring( 10, 10 ): brown fox |
| 7 |
str.insert( 36, "old " ): The quick brown fox jumped over the old lazy dog |
| 8 |
str.erase( 40, 5 ): The quick brown fox jumped over the old dog |
| 9 |
str.replace( 40, "cat" ): The quick brown fox jumped over the old cat |
| 10 |
str.replace( 4, 5, "slow" ): The slow brown fox jumped over the old cat |
| 11 |
str.find('x'): 17 |
| 12 |
str.find('x', 15): 17 |
| 13 |
str.find("fox"): 15 |
| 14 |
str.find("fox", 20): -1 |
| 15 |
str.rfind('o'): 35 |
| 16 |
str.rfind('o', 20): 16 |
| 17 |
str.rfind("fox"): 15 |
| 18 |
str.rfind("fox", 20): 15 |