--substring( expression, start, length ) expression待截取的文字 start 截取位置的起始下标 length 要截取的长度--左边第一个...
分类:
数据库 时间:
2014-06-27 21:36:26
阅读次数:
261
function a(){ var v=document.getElementsByName("radio"); for(var i=0;i<v.length;i++){ if(v[i].checked==true){ alert(v[i].value); } } }
分类:
Web程序 时间:
2014-06-27 17:15:23
阅读次数:
316
使用fstream读取文件,什么时候读到文件结束呢。首先想到的是,将现在的位置与文件的长度对比,然后再fstream中无法直接获取文件长度。可以采用如下方法fstream in;in.open("path",ios::in);in.seekg(0,ios::end);int length=in.te...
分类:
其他好文 时间:
2014-06-27 17:01:50
阅读次数:
939
先看语法:String.SubString(int index,int length) index:开始位置,从0开始 length:你要取的子字符串的长度例子: 1 using System; 2 using System.Collections.Generic; 3 using Sys...
分类:
其他好文 时间:
2014-06-26 18:31:49
阅读次数:
214
1.javascript的数组API:
//定义数组
var pageIds = new Array();
pageIds.push('A');
数组长度
pageIds.length;
//shift:删除原数组第一项,并返回删除元素的值;如果数组为空则返回undefined
var a = [1,2,3,4,5];
var b = a.shift(); //a:[2,3,4...
分类:
Web程序 时间:
2014-06-26 14:20:09
阅读次数:
403
Given a string s consists of upper/lower-case alphabets and empty space characters
' ',
return the length of last word in the string.
If the last word does not exist, return 0.
Note...
分类:
其他好文 时间:
2014-06-26 13:55:01
阅读次数:
179
siluke123输出:这样一来我的字输出:这样string mb_strcut ( string $str , int $start [, int $length [, string $encoding ] )mb_strcut() 和 mb_substr() 类似,都是从一个字符串中提取子字符串...
分类:
其他好文 时间:
2014-06-25 12:37:48
阅读次数:
186
Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring.For "(()", the lon...
分类:
其他好文 时间:
2014-06-25 11:07:45
阅读次数:
230
Given a string s consists of upper/lower-case alphabets and empty space characters '
', return the length of last word in the string.
If the last word does not exist, return 0.
Note: A word is...
分类:
其他好文 时间:
2014-06-25 10:30:08
阅读次数:
220
题目链接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 conca...
分类:
其他好文 时间:
2014-06-25 09:42:27
阅读次数:
230