string teststring = abc:def;
teststring.substring( 2 ); // return c:def;
teststring.substring( teststring.lastindexof( ":" ) + 1 );//return def
teststring.substring( teststring.lastindexof( ":" ) ); //return def:
teststring.substring( 2, 3 ); // return c:d 從0開始算, 到第2個字元(即第3個字母),共擷取3個字母.
LINQ to SQL的一些簡單用法
static void main string args new person 新建乙個list,事先存放一些資料 var a personlist.firstordefault 獲取personlist中第一條資料 var b personlist.where p p.personid 2 fir...
python dict的一些簡單用法
我以為我dict用的很熟了,但是真正再去用的時候發現還是底子太薄,太多地方容易出錯了 d dict or 更簡單 d 這樣建立了乙個新的dict,不包含任何key,value if d.han key key do something.乙個例子 比如說我有乙個list,裡面有重複的元素,我要統計所有...
jquery的一些簡單用法
複習一下jquery獲取表單的一些用法 表單是動態生成的乙個陣列,可以有n個class和name相同的表單 提交按鈕的click事件裡面做判斷邏輯 monitor each function else if val.length 500 else 實際上就是jquery的each的用法,重點關注cl...