码迷,mamicode.com
首页 >  
搜索关键字:substring with conca    ( 3920个结果
leetcode第五题--Longest Palindromic Substring
Problem:Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique lo...
分类:其他好文   时间:2014-10-11 02:20:24    阅读次数:227
js中substr,substring,indexOf,lastIndexOf等的用法
1.substrsubstr(start,length)表示从start位置开始,截取length长度的字符串。var src="images/off_1.png";alert(src.substr(7,3));弹出值为:off2.substringsubstring(start,end)表示从st...
分类:Web程序   时间:2014-10-10 20:52:04    阅读次数:186
StringUtil
/*1. 截取指定位置的字符串*/ StringUtils.substring("dskabcee", 3); /*结果是:jjjjj*/ StringUtils.substring("dskabcee", 3, 5); /*结果是:ab*/ ...
分类:其他好文   时间:2014-10-10 18:18:14    阅读次数:179
Longest Substring Without Repeating Characters
这题看起来挺简单的,就是存一个哈希表,然后依次遍历整个字符串,遇到前面有过的字符的时候,就该停止当前计数,新的子串应该从发现该字符的位置的下一位置开始。我开始写了一个简单的写法,发现超时了: if (s.empty()) return 0; if (s.length() == 1) retur.....
分类:其他好文   时间:2014-10-10 14:28:10    阅读次数:160
Mysql字符串截取函数SUBSTRING的用法说明
感觉上MySQL的字符串函数截取字符,比用程序截取(如PHP或JAVA)来得强大,所以在这里做一个记录,希望对大家有用。 函数: 1、从左开始截取字符串 left(str, length) 说明:left(被截取字段,截取长度) 例:select left(content,200) as abstr...
分类:数据库   时间:2014-10-10 12:21:44    阅读次数:324
Java获取文件的类型(扩展名)
File file=new File("E:\\aa.jpg"); String fileName=file.getName(); String fileTyle=fileName.substring(fileName.lastIndexOf("."),fileName.length()); System.out.println(fileTyle); 程序运行效果图:...
分类:编程语言   时间:2014-10-09 20:49:27    阅读次数:239
Longest Valid Parentheses
[leetcode] Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring....
分类:其他好文   时间:2014-10-09 17:06:08    阅读次数:187
leetcode--Longest Substring Without Repeating Characters
Problem:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating le...
分类:其他好文   时间:2014-10-09 13:49:13    阅读次数:213
关于最长不重复子串的问题
题目描述:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating lette...
分类:其他好文   时间:2014-10-09 02:29:17    阅读次数:178
mysql 截取指定的两个字符串之间的内容(locate,substring)
如需转帖,请写明出处http://blog.csdn.net/slimboy123/archive/2009/07/30/4394782.aspx今天我同事在用mysql的时候,需要对一个字符串中的指定内容进行截取,如 现有字符串 "[]aseabcd[12345]ddxabcdsx[]",要截取"...
分类:数据库   时间:2014-10-09 00:36:17    阅读次数:324
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!