码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
.NET截断字符串
1 /// 2 /// 截断字符串 3 /// 4 /// 要截断的字符串 5 /// 要保留的字符长度 6 /// 截断后的字符串 7 public static string F...
分类:Web程序   时间:2015-04-19 14:31:33    阅读次数:159
Python字符串和字典相关操作
字符串操作: 字符串的 % 格式化操作: str = "Hello,%s.%s enough for ya ?" values = ('world','hot') print str % values 输出结果: Hello,world.hot enough for ya ? 模板字符串: #coding=utf-8 from string import Te...
分类:编程语言   时间:2015-04-19 13:17:14    阅读次数:157
Java字符串处理
一、概述 Java是以String类型的对象来实现字符串。String是一个类,当创建一个String对象后,所创建的字符串是不能改变的。在需要使用可修改的字符串时,Java提供两个选择—StringBuffer和StringBuilder。注:声明为String引用的变量在任何时候都可以改变,以指向一些其他的String对象。 二、String构造函数 String s...
分类:编程语言   时间:2015-04-19 13:16:39    阅读次数:116
c#学习笔记之字符串和正则表达式
一、字符串c#中提供了一系列关于string类型的值的操作,便于我们对string进行各种类型的操作,例如比较,转化成字符串等等eg:using System;using System.Collections.Generic;using System.Linq;using System.Text;u...
分类:Windows程序   时间:2015-04-19 13:07:45    阅读次数:260
如何将C#对象转化为JSON字符串
System.Web.Extensions.dll中类JavaScriptSerializer可以帮助我们把C#对象转化为JSON字符串。有一个Person类 1 public class Person 2 { 3 private string name; 4 5 ...
分类:Windows程序   时间:2015-04-19 13:02:05    阅读次数:162
泛型方法动态生成表达式树 Expression
public string GetGridJSON(TraderInfo model) { IQueryable Temp = db.TraderInfo; if (model.LoginAccount != null) ...
分类:其他好文   时间:2015-04-19 12:59:28    阅读次数:224
Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.思路:这道题其实很简单。只不过一开始我就想复杂了,一看求Longest,就联想到DP。然后又联想到Set来求交并。后来,突然想到...
分类:其他好文   时间:2015-04-19 12:54:06    阅读次数:121
Java:thinging in java p158 exercise 1
Create a class with a String field that is initialized at the point ofdefinition, and another one that is initialized by the constructor. What isthe d...
分类:编程语言   时间:2015-04-19 11:34:00    阅读次数:171
约瑟夫环 java 对象数组实现
import java.util.Scanner;class Person{ String name; int seqno; Person(String _name, int _seqno){ name = _name; seqno = _seqno; ...
分类:编程语言   时间:2015-04-19 11:29:52    阅读次数:172
Task Parallel Library02,更进一步
在前一篇中,了解了Task的基本用法 如果一个方法返回Task,Task,如何获取Task的返回值,获取值的过程会阻塞线程吗? static void Main(string[] args) { var result = DoWorkAsync().Result; Console.WriteLine...
分类:其他好文   时间:2015-04-19 11:22:45    阅读次数:132
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!