@sstral() Function |
![]() ![]() ![]() |
@sstral() function ("Substring After Last") extracts the substring existing in a string after the last occurrence of the reference substring and returns it. Syntax: @sstral(string-expression, reference-substring-expression[, default-substring-expression])
string-expression The string to extract a substring from reference-substring-expression The reference substring to searched. The substring to be extracted starts right after the last occurrence of this substring in string-expression default-substring-expression This optional parameter defines the substring to return in case of the reference substring is not found.
Examples: @sstral('aaa bbb ccc',' ') @// result: 'ccc' @sstral('123.45','.') @// result: '45'
@set(v:full_file_name, 'c:\aaa\bbb\ccc.txt') @set(v:file_name, sstral(v:full_file_name,'\',v:full_file_name) ) @// returns: 'ccc.txt'
See @sstr(), @rsstr(), @sstra(), @sstral(), @sstrb(), @sstrbl() |