rotateleft( char* str, int n) rotates the string str n times to the left.
rotateleft("abcdefgh",4) returns "efghabcd" and
rotateright("abcdefgh",4) returns "hgfeabcd".
|
strpstr(char* str, char* pattern)checks if the string str matches the pattern . '%' is a special character and matches one or more characters.
|
|
strcmp(char* dest, char* src) compares dest and src strings and returns less than 0 (dest is less than src), 0 (dest is equal to src) or greater than 0 (dest is greater than src). stricmp is exactly the same as strcmp except it is case insensitive.
|
char* strstr(char* str, char* sub) returns a pointer to the beginning of the substring sub in the source string str.
|
strcpy(char* dest, char* src)copies the source string to the a target string including the terminating '\0' character. strncpy is just like strcpy except it copies only the first n characters.
strcat(char* dest, char* src) concatinates the src string onto dest string. strncat is the same as strcat except it concatenates the first n characters.
|
|
strlen method compute the number of characters in a string and numlen counts the number of digits on a integer number.
|
|
The void Permutuation(char* str) method use recursion to find the possible permutation of a string.
|
|
These methods sums the largest two or n integers in an array of integers where every integer is between 0 and 9.
|
|
This method finds the largest sum of contigious integers in O(n)
|
|
String Manipulation: First Unique Character in a string?
|
|
String Manipulation: Remove duplicates
|
|
These two methods reverses the entire sentense and only words in a sentence respecitively. For example,
"This is for test" becomes "test for is This" when passed to ReverseSentence and it becomes "sihT si rof tset" when it is passed to Reverse Words.
|