字符串.charAt(index):返回前面字符串中指定位置的字符字符串.charCodeAt(index):返回前面字符串中指定位置的字符的编码(unicode)String.fromCharCode(编码值):把编码值转成对应的字符字符串.substring(start, end):返回前面原始...
分类:
其他好文 时间:
2015-10-16 18:37:14
阅读次数:
127
js中substr,substring,indexOf,lastIndexOf,split等的用法1.substrsubstr(start,length)表示从start位置开始,截取length长度的字符串。var src="images/off_1.png";alert(src.substr(7...
分类:
Web程序 时间:
2015-10-13 20:50:12
阅读次数:
186
JS截取字符串:slice(),substring()和substr()1.substr 方法返回一个从指定位置开始的指定长度的子字符串。stringvar.substr(start [, length ])参数stringvar必选项。要提取子字符串的字符串文字或 String 对象。start必...
分类:
Web程序 时间:
2015-10-12 22:35:48
阅读次数:
216
下面介绍2种swift的字符串截取方法,实际上用到了substringFromIndex,substringToIndex,substringWithRange 1.将String转化为NSString再截取,代码如下: ?var?s="1234567890"var?ns1=(s?as?NSString).substri...
分类:
编程语言 时间:
2015-10-11 18:14:34
阅读次数:
241
主要学习自:http://articles.leetcode.com/2011/11/longest-palindromic-substring-part-ii.html问题描述:回文字符串就是左右对称的字符串,如:"abba",而最长回文子串则是字符串长度最长的回文子字符串,如"abbaca"的最...
分类:
编程语言 时间:
2015-10-11 17:52:19
阅读次数:
215
Given a strings, cutsinto some substrings such that every substring is a palindrome.Return the minimum cuts needed for a palindrome partitioning ofs.E...
分类:
其他好文 时间:
2015-10-09 11:39:04
阅读次数:
240
题目:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters...
分类:
其他好文 时间:
2015-10-08 06:51:29
阅读次数:
214
题目: Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique lo...
分类:
其他好文 时间:
2015-10-06 22:12:48
阅读次数:
479
1. ?The substring() Method in JDK 6 and JDK 7 http://www.programcreek.com/2013/09/the-substring-method-in-jdk-6-and-jdk-7/ 2.?String is passed by “reference” in Java http://www.programcreek.co...
分类:
编程语言 时间:
2015-10-06 12:59:37
阅读次数:
195
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n).For example,S="ADOBECODEBA...