Last active
August 29, 2015 14:07
-
-
Save leontastic/ed966e33cb9aeb1916c0 to your computer and use it in GitHub Desktop.
Improved documentation for the commands to be used in the test harness for A3Q2 (CS 246)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### STRING CONCATENATION | |
s destination source1 source2 // + - [[ MUTATE ]] concatenate two sources | |
t destination source1 string // + - [[ MUTATE ]] concatenate a source followed by a specified string | |
### FIND | |
/ source1 source2 // / - [[ PRINT ]] print number of times source2 appears in source1 | |
% destination source1 source2 // % - [[ MUTATE ]] removes occurrences of source2 in source1 | |
### MEMORY MANAGEMENT | |
f destination // default constructor - [[ CREATE ]] create empty iString (basically, empty string) | |
n destination string // iString(char*) - [[ CREATE ]] create an iString object with given string as contents | |
i destination source // copy constructor - [[ COPY ]] copy an existing iString object using the copy constructor | |
= destination source // = - [[ COPY ]] copy an existing iString object using the assignment operator | |
e source // delete source/call destructor - [[ DESTROY ]] cleans up memory (must be called whenever new iStrings are created) | |
### AUXILIARY | |
r destination string // >> - [[ READ ]] read a string into an iString object | |
w source // - [[ PRINT ]] print the iString | |
l source // - [[ PRINT ]] print length of iString |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For '=' maybe you could label it [[ ASSIGNMENT ]] instead of [[ COPY ]]