${string:position}
Extracts substring from $string at $position.
Example : teststring="MyTestString"; echo ${teststring:1}
Result : yTestString
${string:position:length}
Extracts $length characters of substring from $string at $position.
Example : teststring="MyTestString"; echo ${teststring:0:1}
Result : M
expr index $string $substring
Numerical position in $string of first character in $substring that matches.
Example : expr index $teststring "str"
Result : 5
expr match "$string" '$substring'
expr "$string" : '$substring'
$substring is a regular expression. Find a match at "position"
${#string}
expr length $string
These are the equivalent of strlen() in C.
expr "$string" : '.*'
Length of a string