home *** CD-ROM | disk | FTP | other *** search
- string1 = "The first string.", length = 17.
- string2 = "01234567890123456789", length = 20.
- String1 + String2 = "The first string.01234567890123456789", length = 37.
- String1 = "The first string.", length = 17.
- string1!=string1: 0, string1!=string2: -1
- left5 = 01234 right5 = 56789 mid5to10 = 567890 mid6len5 = 67890
- Substrings from string1 and "first"...Left:"The " Right:"first string."
- Extract parts from "don:*:23:21:Don Yacktman:/LocalLibrary/Users/don:/bin/csh" delimiting with ':':
- Part #3 is "23"
- Part #10 is "(null pointer)"
- Return was nil.
- First part is "don"
- Last part is "/bin/csh"
- Extract all parts with while loop:
- part #0 is: "don".
- part #1 is: "*".
- part #2 is: "23".
- part #3 is: "21".
- part #4 is: "Don Yacktman".
- part #5 is: "/LocalLibrary/Users/don".
- part #6 is: "/bin/csh".
- Given: /Net/darth/Users/don/Projects/daymisckit_proj/daymisckit-1/DAYString.m
- Path is: /Net/darth/Users/don/Projects/daymisckit_proj/daymisckit-1
- Filename is: DAYString.m
- Carl's string: " Hello, how are you? ", length = 25
- Numwords: 4
- 3rd word: "are"
- trimmed: "Hello, how are you?"
- Numwords: 4
- Reversed: "?uoy era woh ,olleH"
- Reversed again: "Hello, how are you?"
- ToUpper: "HELLO, HOW ARE YOU?"
- ToLower: "hello, how are you?"
- Inserting "Oh! " at 0: "Oh! hello, how are you?"
- Char at 0: 'O'
- ReplaceFrom 0to2 with "YOHO!": "YOHO! hello, how are you?"
- spotOf 'o': 10
- spotOf 'o' nocase: 1
- rspotOf 'O': 3
- rspotOf 'O' nocase: 22
- 10th rspotOf 'O': -1
- replace "YOHO!" with "My!": "My! hello, how are you?"
- String now is " Hello, I am fine today. Right? "
- Squashed: "Hello, I am fine today. Right?"
- endcmp "Right?": 0
- endcasecmp "RIGHT?": 0
- endcmp "RIGHT?": 1
- endcasecmp n:3 "nacHT?": 0
- replaceCharAt:0 with 'J': "Jello, I am fine today. Right?"
- insertChar 'a' at 1: "Jaello, I am fine today. Right?"
- Not empty ("not empty"): NO (length = 9)
- Empty ("(null pointer)"): YES (length = 0)
- Replace all 'i' with '!': "Someth!ng w!cked th!s way comes.".
- catStrings: "one two three four five".
- concatenateStrings: "One Two Three Four Five".
- String now is "Something wicked this way comes."
- (All tests below restart with above string)
- Number of 's': 2
- Number of 's' nocase: 3
- Replace all 's' with '!': "Something wicked thi! way come!.".
- Replace all 's' with 's' nocase: "something wicked this way comes.".
- Replace all 's' with "Hi!": "Something wicked thiHi! way comeHi!.".
- Replace all 's' with "Hi!" nocase: "Hi!omething wicked thiHi! way comeHi!.".
- Replace all 's' with "" nocase: "omething wicked thi way come.".
- numOfChars 'siw' nocase: 8
- spotOfChars 'siw': 6
- spotOfChars 'siopen w' nocase: 0
- spotOfChars 'siw' #3 nocase: 11
- Replace all 'siw' with '!' nocase: "!ometh!ng !!cked th!! !ay come!.".
-