substring的用法 怎么截取字符串

返回一个新的字符串,它是此字符串的一个子字符串。该子字符串始于指定索引处的字符,一直到此字符串索引末尾。在SQLserver数据库中,用于截取字符串的某部分。

subString的用法

public static void main(String[] args) {

// substring(beginIndex,endindex); 根据索引用来截取 String 类型的值 返回一个新的字符串

// 参数: beginIndex - 开始处的索引(包括)。

// endindex 结尾处索引(不包括)。

String s="abcdef"; //重

s= s.substring(1,5);

System.out.println(s);

}

substring双语例句

The Substring function will extract text from a source string.

Substring函数将从一个源字符串中提取文本。

Improved Algorithm for BM String Matching Based on Prefix Substring

基于前缀的BM串匹配改进算法

Scalable Distributed Data Structure for Substring Searching

具有子串检索功能的可扩展分布式数据结构

Returns the index of the first character of a specified substring in a string.

返回指定子串首字符在串中的索引。

The length argument specifies the length of the desired substring.

长度参数指定了所需子字符串的长度。

 

本文地址:http://www.renduyinjie.com/xueke/110681.html

您可能还会对下面的文章感兴趣: