types of string function
Answers
Answered by
1
strcmp - compare two strings. strcpy - copy a string.strlen - get string length. strncat - concatenate one string with part of another.
Answered by
1
HELLO FRIEND!
If you are asking for string functions in JAVA, here's your answer:
1. charAt(): Takes out a specific character from the defined position of a string.
2. length(): Finds out the length (number of characters) of the string.
3. substring(): Returns a specific part of the string (as mentioned in the code).
Format: String str;
String str1 = str.substring(2,6), or
String str2 = str.substring(2);
4. toUpperCase(): Converts the case of the string to UPPERCASE.
5. toLowerCase(): Converts the case of the String to lowercase.
6. compareTo(): Compares equality between two strings laxographically, and returns either 0, positive value, or negative value.
7. equals(): Compares two strings normally and returns true or false.
8. equalsIgnoreCase(): Compares two strings ignoring the case of each strings.
9. indexOf(): Returns the position (index) of a specific character in the String.
10. concat(): Concatenates (joins) two strings together with a space in the middle.
THANKS!
If you are asking for string functions in JAVA, here's your answer:
1. charAt(): Takes out a specific character from the defined position of a string.
2. length(): Finds out the length (number of characters) of the string.
3. substring(): Returns a specific part of the string (as mentioned in the code).
Format: String str;
String str1 = str.substring(2,6), or
String str2 = str.substring(2);
4. toUpperCase(): Converts the case of the string to UPPERCASE.
5. toLowerCase(): Converts the case of the String to lowercase.
6. compareTo(): Compares equality between two strings laxographically, and returns either 0, positive value, or negative value.
7. equals(): Compares two strings normally and returns true or false.
8. equalsIgnoreCase(): Compares two strings ignoring the case of each strings.
9. indexOf(): Returns the position (index) of a specific character in the String.
10. concat(): Concatenates (joins) two strings together with a space in the middle.
THANKS!
Similar questions
Math,
8 months ago
Computer Science,
8 months ago
Math,
8 months ago
Physics,
1 year ago
CBSE BOARD XII,
1 year ago
Math,
1 year ago