您的位置首页百科知识

substr函数用法

substr函数用法

的有关信息介绍如下:

substr函数用法

substr Oracle中的截取字符串函数。

a.substr(0,2)。

basic_string::substr。

basic_string substr(size_type _Off = 0,size_type _Count = npos) const。功能:从一个字符串复制一个从指定位置开始,并具有指定长度的子字符串。

字符串值:start_position,截取字符串的初始位置, Number型,start_position为负数时,表示从字符串右边数起。length截取位数,Number型,其中,length为可选,如果length为空,则返回start_position后面的所有字符。从start_position开始,取出length个字符并返回取出的字符串。

输出结果

The original string str1 is:

Heterological paradoxes are persistent.

The substring str1 copied is: logical

The default substring str3 is:

Heterological paradoxes are persistent.