码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
【转】Java中字符串中子串的查找共有四种方法(indexof())
原文网址:http://wfly2004.blog.163.com/blog/static/1176427201032692927349/Java中字符串中子串的查找共有四种方法,如下:1、int indexOf(String str) :返回第一次出现的指定子字符串在此字符串中的索引。2、int ...
分类:编程语言   时间:2015-04-26 22:37:31    阅读次数:142
第5章 字符串 判断截取的两个字符串相同
1、第一种方法 package five; public class Fivetwozero { public static void main(String[] args){ //定义两个字符串 String str="hello world"; String str1="Hello j...
分类:其他好文   时间:2015-04-26 22:24:40    阅读次数:135
利用在线工具自动化生成findviewById
我们在编码的时候经常会用到findviewById,不厌其烦,我之前介绍过一个很取巧的方法,挺好用的,这里再贴一下:public class KaleBaseActivity extends Activity { private String TAG = getClass().getSimpl...
分类:其他好文   时间:2015-04-26 19:43:18    阅读次数:786
JavaScript - String对象正则匹配
String对象正则匹配 <tit...
分类:编程语言   时间:2015-04-26 18:28:00    阅读次数:288
lua string之find
--计算字符串string中char的个数--better versionlocal function count_char(string, char) local index = 0 local count = 0 while ture do index = string.find(s...
分类:其他好文   时间:2015-04-26 18:09:20    阅读次数:125
C#课后小试5
1.string相关函数我分别尝试了compare substring split函数,如上图示。compare函数会比较输入是两个string,然后返回一个int值显示结果。substring可以读取string里的一部分,(开始索引,索引个数)。split可以对string按照给出的条件分割。2...
分类:Windows程序   时间:2015-04-26 18:05:02    阅读次数:159
leetcode_26题——Remove Duplicates from Sorted Array (string)
Remove Duplicates from Sorted ArrayTotal Accepted:57887Total Submissions:183534My SubmissionsQuestionSolutionGiven a sorted array, remove the duplicat...
分类:其他好文   时间:2015-04-26 17:59:54    阅读次数:122
【Java】一个最简单的事件总线实现
#一个最简单的事件总线实现 [MicroBus](https://github.com/konmik/MicroBus) ##使用 注册 class Receiver implements MicroBus.BusEventReceiver { public onCreate() { bus.register(this, String.class); } pu...
分类:编程语言   时间:2015-04-26 16:55:20    阅读次数:150
Leetcode:Longest Palindromic Substring
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring. 基本思路:回文字符串显然有个特征是沿...
分类:其他好文   时间:2015-04-26 16:51:58    阅读次数:142
jpg图片攻击测试代码
matlab代码如下:close all; clear all; clc; % key=1; %key 用来设置需要压缩的比例 %读入原始图像original string,os 原始图像字符串 [filename pathname]=uigetfile('*.bmp;*.jpg;*.tif', '原图像.jpg'); os=[pathname filename]; o=imread(os); %读...
分类:其他好文   时间:2015-04-26 16:48:18    阅读次数:174
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!