Programming Fundamentals/String Functions

Overview
String functions are used in computer programming languages to manipulate a string or query information about a string.

Discussion
Most current programming languages include built-in or library functions to process strings. Common examples include case conversion, comparison, concatenation, find, join, length, reverse, split, substring, and trim.

Key Terms

 * case
 * A function that either makes a string all uppercase or lowercase depending on which mode is used.


 * comparison
 * Determines if the value (string or non-string), is less than, greater than, or equal to the value it's being compared to.


 * concatenate
 * Join character strings end-to-end.


 * find
 * Checks if a character in a string exists and if it does, finds the location of that character in the string.


 * join
 * Joins strings together using a character of the person's choosing.


 * length
 * Finds how many characters are in a string, or the number of elements in an array.


 * replace
 * Replaces all instances of one character in a string with another.


 * reverse
 * Places all characters of a string or elements in an array in reverse order.


 * split
 * Divides a string's content onto separate lines based off a chosen character.


 * substring
 * Creates a smaller string by using characters from a bigger string.


 * trim
 * Remove leading and trailing spaces from a string.