Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
{s.substr,offset,length} Return substring starting at offset having size of 'length'. If offset is negative, then it is counted from the end of the value, -1 being the last char. In case of positive value, 0 is first char. Length can be positive or negative. In case length is negative, it is counted from the end of the value, 0 means last character. Example: $var(x) = "abcdefghijk"; $(var(x){s.substr,3,4}) = "defg" $(var(x){s.substr,1,0}) = "bcdefghijk" $(var(x){s.substr,2,-2}) = "cdbcdefghi" $(var(x){s.substr,-5,-3}) = "gh" $(var(x){s.substr,-5,0}) = "ghijk" $(var(x){s.substr,-100,0}) = "abcdefghijk" $(var(x){s.substr,2,100}) = "cdefghijk" $(var(x){s.substr,100,5}) = ""
- Loading branch information