s.sbs()

Read(137) Label: string, substring,

Description:

Get multiple substrings from a string to form a new string.

Syntax:

s.sbs(a:b,…)

Note:

The function gets multiple substrings from string s to form a new string.

Parameters:

s

The source string

a

The start position for getting the future substrings; default is 1

b

The end position for getting the future substrings, whose defaut is s.len(); let b=a when :b is absent

Return value:

A string

Example:

 

A

 

1

="abcdefgh".sbs(2:3)

"bc"

2

="abcdefgh".sbs(:3)

"abc"

3

="abcdefgh".sbs(3:)

"cdefgh"

4

="abcdefgh".sbs(3)

"c"

5

="abcdefgh".sbs(2:4,6:7)

"bcdfg"