一、常见的字符串处理函数// 返回字符的长度,一个中文算2个String.prototype.ChineseLength = function() { return this.replace(/[^\x00-\xff]/g, "**").length;}// 去掉字符串两端的空白字符String.p...
分类:
编程语言 时间:
2015-06-11 12:47:02
阅读次数:
196
#include#include#include#define MAXN 400using namespace std;struct node{ string s1; string s2;};node a[400];int main(){ //freopen("acm.acm","r",stdin)...
分类:
其他好文 时间:
2015-06-11 12:46:40
阅读次数:
96
FileUpload经常会用到,代码贴出来不必重复再写。protected void Button1_Click(object sender, EventArgs e) { string strName = FileUpload1.PostedFile.FileName;//...
分类:
Web程序 时间:
2015-06-11 12:42:57
阅读次数:
141
解析指定格式为对象/** * 解析指定格式为对象 * @param string格式数据:**** * @param obj 对象 * @return */ public static Object setParamToObj(String string,Object obj){ Str...
分类:
其他好文 时间:
2015-06-11 12:41:46
阅读次数:
101
public static String getJSON(String url, int timeout) { HttpURLConnection c = null; try { long requestStart = System.currentTimeMillis();...
分类:
Web程序 时间:
2015-06-11 12:38:28
阅读次数:
184
GetImageSize作用:取得图片的大小[即长与宽] 用法:array GetImageSize(string filename, array [imageinfo]);ImageArc作用:画弧线 用法:int ImageArc(int im, int cx, int cy, int w, i...
分类:
Web程序 时间:
2015-06-11 12:33:09
阅读次数:
108
比较String,StringBuffer与StringBuider
分类:
其他好文 时间:
2015-06-11 12:31:49
阅读次数:
108
1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 int main() 9 {10 //freopen("acm.acm","r",stdin);11 string ...
分类:
其他好文 时间:
2015-06-11 12:30:54
阅读次数:
196
使用Java处理,并且不能使用spilit方法package com.foreverlover;import java.util.Scanner;public class FlipString { public static void Filp(String str) { String[] fl.....
分类:
其他好文 时间:
2015-06-11 12:28:30
阅读次数:
125
正常dfspublic class Solution { public ArrayList> partition(String s) { ArrayList> res = new ArrayList>(); if(s==null||s.length()==0) re...
分类:
其他好文 时间:
2015-06-11 12:27:43
阅读次数:
98