C#中String类的几个方法(IndexOf、LastIndexOf、Substring)
给定两个串,S和T,在S中找到包含T的最短子串,如果不能包含,返回空字符。Given a string S and a string T, find the minimum window in S which will contain all the characters in T in compl...
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv...
分类:
其他好文 时间:
2014-11-14 13:58:41
阅读次数:
202
IndexOf、LastIndexOf、Substring的用法今天遇到截取字符串的问题,在网上查了IndexOf、LastIndexOf、Substring这三种截取字符串的使用总结如下: String.IndexOfString.IndexOf 方法 (Char, Int32, Int32)报告...
分类:
其他好文 时间:
2014-11-14 12:11:26
阅读次数:
257
http://poj.org/problem?id=3693
Maximum repetition substring
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 7241
Accepted: 2162
Description
The repe...
分类:
编程语言 时间:
2014-11-14 00:19:28
阅读次数:
338
描述Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task is only to tell how many times does A appear as a substring of B? For ...
分类:
其他好文 时间:
2014-11-13 20:39:39
阅读次数:
139
最近在做IM时需要知道当前Activity是哪一个Activity.自己整理一下两种方法
第一种:要方便一点private String getRunningActivityName() {
String contextString = context.toString();
return contextString.substring(contextString.lastIndexOf...
分类:
移动开发 时间:
2014-11-13 10:58:03
阅读次数:
199
QString MaxSubString(QString inputString){ QString subString = ""; int strLen = inputString.size(); if (strLen maxSubStrLen) { ...
分类:
其他好文 时间:
2014-11-12 22:41:02
阅读次数:
265
Given a string S, find the longest palindromic substring in S.Note:This is Part II of the article:Longest Palindromic Substring. Here, we describe an ...
分类:
其他好文 时间:
2014-11-12 21:05:22
阅读次数:
345
SP:BEGIN WHILE instr(_checkstr,_str) 0 DO SELECT sortNum INTO @V FROM InApp_job WHERE jobId = substring(_checkstr,1,instr(_checkstr,_str)-1); DELETE F...
分类:
数据库 时间:
2014-11-11 20:53:35
阅读次数:
217