substring(i, s)
substring(i, n, s)
substring(s, i, n)
substring(s, i)
substring((i, n), s)
The expressions substring(i, n, s), substring(s, i, n), and substring((i, n), s) all return the substring that starts at index i and has n characters.
In other words, if $s=s_0s_1s_2\ldots s_k$, then the substring returned is $s_i s_{i+1}\ldots s_{i+n-1}$.
Indices begin at zero, and a negative index is counted from the end of the string. Requests for out-of-bound character positions are silently ignored.
|
|
|
|
|
The expressions substring(i, s) and substring(s, i) return the substring that starts at index i and continues to the end of the string.
In other words, if $s=s_0s_1s_2\ldots s_k$, then the substring returned is $s_i s_{i+1}\ldots s_k$.
|
|
The object substring is a compiled function.
The source of this document is in Macaulay2Doc/functions/substring-doc.m2:62:0.