File类1.String[] list() 返回一个目录下文件和文件夹路径的字符串数组2.File[] listFiles() 以File类对象数组,返回目录下的所有文件和文件夹3.isDirectory()判断是否是目录OutputStream抽象类1.直接子类FileOutputStream(...
分类:
编程语言 时间:
2015-10-27 21:43:10
阅读次数:
223
Javascript中检验字符串、数组、json的方法: 1.isString:function isString(str){ return str instanceof String || typeof str=='string';} js中创建字符串有两种方式:var str = 'z...
分类:
Web程序 时间:
2015-10-27 19:37:47
阅读次数:
233
我们由一个简单的问题逐步入手:有一个庞大的字符串数组,然后给你一个单独的字符串,让你从这个数组中查找是否有这个字符串并找到它,你会怎么做?有一个方法最简单,老老实实从头查到尾,一个一个比较,直到找到为止,我想只要学过程序设计的人都能把这样一个程序作出来,但要是有程序员把这样的程序交给用户,我只能用无...
分类:
编程语言 时间:
2015-10-27 17:07:54
阅读次数:
248
设计思想:输入字串,求出字符串长度,并将其转化为字符串数组,使得每个字符串加三后输出。流程图:源代码:import javax.swing.JOptionPane;public class key { public static void main(String[] args){ String n....
分类:
其他好文 时间:
2015-10-24 23:34:19
阅读次数:
197
题目来源: https://leetcode.com/problems/substring-with-concatenation-of-all-words/题意分析: 输入一个字符串s和一连串的长度相同的字符串数组words,找出仅由所有的words组成的s的子字符串起始位置。题目思路: 由于...
分类:
编程语言 时间:
2015-10-21 20:59:51
阅读次数:
199
系统参数: os.Args 存放命令参数的字符串数组,其中os.Arg[0]为命令本身的路径,其余项存放输入的参数 例:$ go run myapp.exe -d /home os.Args[0]: 命令路径 os.Args[1]: "-d" os.Args[2]...
分类:
其他好文 时间:
2015-10-21 17:11:36
阅读次数:
169
#include #include#includeusing namespace std;// 描述:execmd函数执行命令,并将结果存储到result字符串数组中 // 参数:cmd表示要执行的命令// result是执行的结果存储的字符串数组// 函数执行成功返回1,失败返回0 int ex....
分类:
编程语言 时间:
2015-10-21 00:02:35
阅读次数:
547
文件读取的类型: (字符串,数组,字典,二进制--- NSData) 1.写入文件. writeToFile: atomically: --针对于数组,二进制数组 writeToFile: atomically: encoding: error: --针对于字符串 2...
分类:
其他好文 时间:
2015-10-14 21:31:54
阅读次数:
136
//-------------字符串----------------- ? ? //字符串的初始化: ? ? //1: ? ? NSString *string = @"我是非凡程序员!"; ? ? NSLog(@"%@",string); ?? ? ? ? //2: ? ? NSString *string2 = [NSS...
分类:
编程语言 时间:
2015-10-14 20:06:16
阅读次数:
299
#include #include main(){ char str[10]={'h','e','\0','l','l','o'};//"hello" printf("string length: %ld,and string is %s\n",strlen(str),str); for(i=...
分类:
编程语言 时间:
2015-10-12 21:09:39
阅读次数:
202