String functions

The built-in string functions are much more significant as AWK is primarily designed as a string-processing language. These functions enhance AWK's power and functionality. In this section, we will discuss the following functions in detail:

  • index (str, sub)
  • length (string)
  • split (str, arr, regex)
  • substr (str, start, [ length ])
  • sub (regex, replacement, string)
  • gsub (regex, replacement, string)
  • gensub (regex, replacement, occurrence, [ string ])
  • match (string, regex)
  • tolower (string)
  • toupper (string)
  • sprintf (format, expression)
  • strtonum (string)
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.17.40