String Methods
charAt
Returns the character at the specified index.charCodeAt
Returns the Unicode value of the character at the specified index.concat
Concatenates strings.indexOf
Returns the first index of a substring, or -1 if not found.lastIndexOf
Returns the last index of a substring.slice
Extracts a section of a string.substring
Returns a substring between two indices.substr
Returns a substring starting at a position with specified length.toLowerCase
Converts string to lowercase.toUpperCase
Converts string to uppercase.trim
Removes whitespace from both ends.trimStart / trimLeft
Removes whitespace from the start.trimEnd / trimRight
Removes whitespace from the end.split
Splits string into an array of substrings.replace
Replaces occurrences of a substring or pattern.replaceAll
Replaces all occurrences of a substring.match
Matches a string against a regular expression.search
Searches for a match and returns the index.startsWith
Checks if string starts with specified substring.endsWith
Checks if string ends with specified substring.includes
Checks if string contains a substring.repeat
Repeats the string a specified number of times.padStart
Pads the string from the start.padEnd
Pads the string from the end.at
Returns the character at an index (supports negative indexing).Static Methods
String.fromCharCode
Creates a string from character codes.Usage Examples
Text Processing
String Validation
Case Conversion
See Also
- ByteString Utilities - Optimized string operations
- RegExp Built-ins - Regular expressions
- Global Functions - String conversion functions