Negative indices count backwards from the beginning of the string.
Non-integer or out of bounds indices return undefined.
import * as S from "flurp/string";const third = S.get(2);const secondToLast = S.get(-2);third("abcdef"); // csecondToLast("abcdef"); // e
the index
Negative indices count backwards from the beginning of the string.
Remarks
Non-integer or out of bounds indices return undefined.
Example