packagemainimport("fmt""strings")funcmain(){s:="helloworld"//是否包含fmt.Println(strings.Contains(s,"hello"),strings.Contains(s,"?"))//索引fmt.Println(strings.Index(s,"o"))ss:="1#2#345"//分割字符串splitedStr:=st
分类:
其他好文 时间:
2019-03-12 12:28:27
阅读次数:
190
packagemainimport("io""strings""fmt""os")funcReadFrom(readerio.Reader,numint)([]byte,error){p:=make([]byte,num)n,err:=reader.Read(p)ifn>0{returnp[:n],nil}returnp,err}//从字符串读funcsampleReadFromString
分类:
其他好文 时间:
2019-03-11 18:56:08
阅读次数:
166
packagemainimport("strings""bufio""fmt""os")funcmain(){/////////////////读strReader:=strings.NewReader("helloworld")//直接读取字符串bufReader:=bufio.NewReader(strReader)data,_:=bufReader.Peek(5)//只读不取fmt.Prin
分类:
其他好文 时间:
2019-03-11 16:11:48
阅读次数:
176
模拟写个日志监控程序:packagemainimport("fmt""time""strings")typeLogProcessstruct{rcchanstring//读chanwcchanstring//写chanpathstring//读取文件的路径influxDBDsnstring//influxdatasource}func(l*LogProcess)ReadFromFile(){//读
分类:
其他好文 时间:
2019-03-10 16:15:14
阅读次数:
136
Redis 是用C语言编写的内存中的数据结构存储系统,可以用来作数据库、缓存、消息中间件. 数据结构 字符串(strings):值是任何种类的字符串 散列(hashs):值是map 字典,数组+链表,不管读多还是写多都能很好的性能 列表(lists):链表或队列或栈 集合(sets):无序集合,可用 ...
分类:
其他好文 时间:
2019-03-09 10:26:53
阅读次数:
212
Description Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we thin ...
分类:
其他好文 时间:
2019-03-08 17:14:02
阅读次数:
167
Define S = [s,n] as the string S which consists of n connected strings s. For example, ["abc", 3] ="abcabcabc". On the other hand, we define that stri ...
分类:
其他好文 时间:
2019-03-05 23:14:14
阅读次数:
198
1、改软件的名称 2、改软件的图标 3、给做好的项目打成APP包 改软件的名称 找到项目的改名的位置 然后用记事本打开strings.xml,然后改自己想要的名字 改软件的图标 找到如下5个文件,然后把里面的图标换成自己想要改的图标即可 给做好的React Native项目打包 输入密钥库口令:12 ...
分类:
移动开发 时间:
2019-03-04 15:56:31
阅读次数:
524
1.查看gcc版本中包含哪些库。 strings /usr/lib64/libstdc++.so.6 | grep GLIBC 可以看出不包含GLIBCXX_3.4.14 2.从网上下载高版本的libstdc++.so.6.0.13以上的版本,比如libstdc++.so.6.0.17。 3.把li ...
分类:
编程语言 时间:
2019-03-01 12:47:09
阅读次数:
2115
Before being an ubiquous communications gadget, a mobile was just a structure made of strings and wires suspending colourfull things. This kind of mob ...
分类:
其他好文 时间:
2019-02-28 13:16:55
阅读次数:
155