The language of awk includes many built-in string manipulation functions:
- length(string): This returns the string length.
- index(string, search_string): This returns the position at which search_string is found in the string.
- split(string, array, delimiter): This populates an array with the strings created by splitting a string on the delimiter character.
- substr(string, start-position, end-position): This returns the substring of the string between the start and end character offsets.
- sub(regex, replacement_str, string): This replaces the first occurring regular expression match from the string with replacment_str.
- gsub(regex, replacment_str, string): This is like sub(), but it replaces every regular expression ...