메소드 | 설명 | |
---|---|---|
Amatch ( string str, string pat ) : int |
Look for a match between the string and the pattern. Look for a match between the string and the pattern. Return count of maching characters before * or #. Return -1 if strings do not match. |
|
Compress ( string s ) : string |
Compresses its input by: dropping space before space, comma, and period; adding space before question, if char before is not a space; and copying all others
|
|
Count ( string s, char c ) : int |
Count number of occurrances of c in str
|
|
FindNum ( string str ) : int |
Look for a number in the string. Look for a number in the string. Return the number of digits at the beginning. |
|
FindPat ( string str, string pat ) : int |
Search in successive positions of the string, looking for a match to the pattern. Search in successive positions of the string, looking for a match to the pattern. Return the string position in str of the match, or -1 for no match. |
|
Match ( string str, string pat, string matches ) : bool | ||
Pad ( string s ) : string |
Pad by ensuring there are spaces before and after the sentence. Pad by ensuring there are spaces before and after the sentence. |
|
Translate ( string str, string src, string dest ) : string | ||
Trim ( string s ) : string |
Trim off leading space
|
메소드 | 설명 | |
---|---|---|
MatchA ( string str, string pat, string matches ) : bool |
Match the string against a pattern and fills in matches array with the pieces that matched * and #
|
|
MatchB ( string strIn, string patIn, string matches ) : bool |
public static Amatch ( string str, string pat ) : int | ||
str | string | |
pat | string | |
리턴 | int |
public static FindPat ( string str, string pat ) : int | ||
str | string | |
pat | string | |
리턴 | int |
public static Match ( string str, string pat, string matches ) : bool | ||
str | string | |
pat | string | |
matches | string | |
리턴 | bool |
public static Translate ( string str, string src, string dest ) : string | ||
str | string | |
src | string | |
dest | string | |
리턴 | string |