演示str中常用的一些函数:1.join():将容器对象以某种特定的格式(字符串)进行拼接组合,最后以字符串的形式返回 lt=['i','love','you','very','much'] str1='-'.join(lt) print(str1,type(str1)) print(str.joi ...
分类:
编程语言 时间:
2019-02-26 00:45:31
阅读次数:
195
js 将json字符串转换为json对象的方法解析 将json字符串转换为json对象的方法。在数据传输过程中,json是以文本,即字符串的形式传递的,而JS操作的是JSON对象,所以,JSON对象和JSON字符串之间的相互转换是关键 例如: JSON字符串:var str1 = '{ "name" ...
分类:
Web程序 时间:
2019-02-25 01:02:00
阅读次数:
240
举例代码: 当: str1 == str2 输出:true 当:str1.equals(str2); 输出:true 当: str1 == str3 输出:false 当:str1.equals(str3); 输出:false 当: str3 == str4 输出:true 涉及到的细节: - St ...
分类:
编程语言 时间:
2019-02-24 13:45:48
阅读次数:
164
```C++ include include char str1[10010], str2[10010]; bool HashTable[128]; int main(){ fgets(str1,10010,stdin); fgets(str2,10010,stdin); int len1 = st ...
分类:
其他好文 时间:
2019-02-24 11:02:28
阅读次数:
180
```C++ include include int main(){ char str1[101], str2[101]; bool HashTable[128] = {false}; scanf("%s", str1); scanf("%s", str2); int len1 = strlen(s ...
分类:
其他好文 时间:
2019-02-24 10:32:00
阅读次数:
154
#include #include int main() { int a[40]={0},b[40]={0},c[100]={0},len1=0,len2=0; char str1[40],str2[40]; gets(str1);len1=strlen(str1); gets(str2);len2... ...
分类:
编程语言 时间:
2019-02-23 15:57:26
阅读次数:
203
平时常用C++刷一些算法题,C++内置了许多好用的工具函数,但时间一长总是容易忘记,这里简单做一下总结,方便复习! atoi(const char str) 将一串字符转换为int型 atof(const char str) 同上,转换为double型 abs(int n) 取绝对值 fill() ...
分类:
编程语言 时间:
2019-02-22 23:01:37
阅读次数:
207
1 #include 2 #include 3 int main(){ 4 char str1[61], str2[61], str3[61], str4[61]; 5 char week[7][4]={"MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"}... ...
分类:
其他好文 时间:
2019-02-21 23:04:26
阅读次数:
179
一、concat()函数 1、功能:将多个字符串连接成一个字符串。 2、语法:concat(str1, str2,...) 返回结果为连接参数产生的字符串,如果有任何一个参数为null,则返回值为null。 3、举例: 例1:select concat (id, name, score) as in ...
分类:
数据库 时间:
2019-02-15 17:23:47
阅读次数:
228
创建字符串 var str = "hello world" var str1 = new String(); console.log(typeof str,typeof str1); 属性 var str = "中华人民共和国"; console.log(str.length); 方法 查,替,截, ...
分类:
其他好文 时间:
2019-02-14 00:12:40
阅读次数:
178