Method 1)
Method 2)
Both will give you the correct length of 16.
Say the variable test contains the string "corndog" but we want just the "dog" part.
echo ${test:4:3} will return just "dog"
The 4 tells us the index of the char that will be the first char in the substring. The 3 tells us how many letters to add starting at the index.
No page links to ManipulatingStrings.