Java中substring方法可以分解字符串,返回的是原字符串的一个子字符串。如果要讲一个字符串分解为一个一个的单词或者标记,StringTokenizer可以帮你。先看个例子:publicstaticvoidmain(String[]args){StringTokenizerst=newStri...
分类:
编程语言 时间:
2015-04-10 15:09:27
阅读次数:
134
4.Median of Two Sorted Arrays
5.Longest Palindromic Substring
6.ZigZag Conversion...
分类:
编程语言 时间:
2015-04-10 11:36:28
阅读次数:
149
题目:Given a string, find the length of the longest substring without repeating characters.For example, the longest substring without repeating letters ...
分类:
其他好文 时间:
2015-04-10 07:00:16
阅读次数:
120
需求:如果对于一行内容过长,则截取前N个字符 其余用省略号表示struts截取字符串方法如下: 50">
...
50">
...
如果不用里面的判断直接写则只会截取长度大于50的,其他小于50的就不会...
分类:
其他好文 时间:
2015-04-09 21:51:48
阅读次数:
122
Problem Description
Given two strings, you have to tell the length of the Longest Common Substring of them.For example:
str1 = banana
str2 = cianaicSo the Longest Common Substring is “ana”, and the...
分类:
编程语言 时间:
2015-04-09 15:33:59
阅读次数:
225
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-04-09 15:18:13
阅读次数:
115
declare @canshu varchar(200)set @canshu='24§咨询客户'--某符号之后的字段内容select substring(@canshu,charindex('§',@canshu,0)+1,100)--某符号之前的字段内容select substring(@can...
分类:
数据库 时间:
2015-04-09 10:24:04
阅读次数:
244
String baseinfo="/com/Bean/DBhelp.properties"; filename=getClass().getClassLoader().getResource("/").getPath(); filename=filename.substring(1,file...
分类:
编程语言 时间:
2015-04-08 21:21:50
阅读次数:
196
字符截取:<s:propertyvalue=‘name.substring(6)‘/>//截取第6个字符之后的字符串<s:propertyvalue=‘name.substring(0,6)‘/>//截取前6个字符注意:substring中间的s要用小写哦,大写是无效的;另外name前面也是可以加对象名的。
分类:
其他好文 时间:
2015-04-08 19:59:10
阅读次数:
136
Given a string s, partition s such that every substring of the partition is a palindrome.
Return all possible palindrome partitioning of s.
For example, given s = "aab",
Return
[
["aa","...
分类:
其他好文 时间:
2015-04-08 15:06:58
阅读次数:
79