码迷,mamicode.com
首页 >  
搜索关键字:substring with conca    ( 3920个结果
leetcode:Longest Palindromic Substring
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 longes...
分类:其他好文   时间:2014-05-24 04:45:39    阅读次数:245
LeetCode:Longest Substring Without Repeating Characters(最长不重复子串)
题目链接Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letter...
分类:其他好文   时间:2014-05-24 02:15:57    阅读次数:291
JavaScript 获取小数任一小数点后的位数的小数
用Javascript取float型小数点后两位,例22.127456取成22.13,如何做? 1.这种方法最不推荐: function get(){ var s = 22.127456 + ""; var str = s.substring(0,s.indexOf(".") + 3); alert(str); } 2. 使用正则表达式获取: function g...
分类:编程语言   时间:2014-05-23 08:06:59    阅读次数:249
【转】C#中如何实现左截取和右截取字符串
使用C#语法编写程序时,我们需要截取一个字符串左边或右边的若干个字符,该如何操作呢?在VB中可以使用left或right函数实现,C#中没有提供这样的函数呢?答案是没有。但是,C#中提供Substring方法可以实现相关功能。首先我们回顾一下Substring方法。用法一: String.Subst...
分类:其他好文   时间:2014-05-22 04:57:09    阅读次数:238
在js中substring和substr区别
substring 方法用于提取字符串中介于两个指定下标之间的字符substring(start,end)开始和结束的位置,从零开始的索引参数 描述start 必需。一个非负的整数,规定要提取的子串的第一个字符在 stringObject 中的位置。stop 可选。一个非负的整数,比要提取的子...
分类:Web程序   时间:2014-05-22 04:55:54    阅读次数:264
LeetCode: Longest Valid Parentheses [031]
【题目】 Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the longest valid parentheses substring is "()", which has length = 2. Another example is ")()())", whe...
分类:其他好文   时间:2014-05-20 16:39:07    阅读次数:280
crm2011 使用SOAP 查询单个记录 Retrieve
function getServiceUrl() { var serverUrl = Xrm.Page.context.getServerUrl(); if (serverUrl.match(/\/$/)) { serverUrl = serverUrl.substring(0, server...
分类:其他好文   时间:2014-05-20 07:40:00    阅读次数:250
[snippet] get parameter
function(name) { var query=location.search.substring(1); var pairs=query.split("&"); for(var i=0;i<pairs.length;i++) ...
分类:其他好文   时间:2014-05-19 10:43:27    阅读次数:266
【leetcode】Longest Palindromic Substring
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:其他好文   时间:2014-05-18 19:39:55    阅读次数:355
LeetCode: Substring with Concatenation of All Words [029]
【题目】 You are given a string, S, and a list of words, L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenation of each word in L exactly once and without any intervening characters. For example, given: S:...
分类:其他好文   时间:2014-05-18 08:31:48    阅读次数:228
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!