json.dumps :把字典转换成字符串 #在python中字典就是json对象 import jsonstr_dict={"name":"xiaoming","age":"18"} #json.dumps :把字典转换成字符串 str1=json.dumps(str_dict) print(ty ...
分类:
Web程序 时间:
2021-06-19 18:52:06
阅读次数:
0
一、概述 String是代表字符串的类,本身是一个最终类,使用final修饰,不能被继承。 二、定义方式 方式一:直接赋值法 String str1 = "hello"; 方式二:创建法 String str2 = new String("hello"); 方式三:创建一个字符数组ch,new St ...
分类:
编程语言 时间:
2021-06-10 18:41:50
阅读次数:
0
<template> <div class="hello"> <p v-show="isShow" style="color:red;font-size:25px;">{{str1}}</p> <p v-show="!isShow" style="color:green;font-size:25px ...
分类:
其他好文 时间:
2021-05-25 18:21:49
阅读次数:
0
今日内容 is,==,id,的用法 id(str),获取变量str在内存中的地址 a==b,判断a与b是都相等,返回bool类型 lst1 is lst2,判断str1与str2的内存地址是否相同 值相同,代码不一定相同 代码块 一个模块,一个函数,一个类,一个文件等都是一个代码块 交互方式输入的每 ...
分类:
编程语言 时间:
2021-05-24 14:17:24
阅读次数:
0
基础数据类型的补充 字符串str补充方法(练习一遍即可)以下方法均不改变原来字符串 str1.capitalize(),将str1字符串的首字母进行大写,其余小写 srt1.swapcase(),将字符串的大小写进行反转 str1.title(),将字符产中的每个单词的首字母进行大写 str1.ce ...
分类:
编程语言 时间:
2021-05-24 14:16:50
阅读次数:
0
拼接字符串 1.CONCAT(s1,s2...sn) 字符串 s1,s2 等多个字符串合并为一个字符串。 SELECT CONCAT("str1", "str2") AS str; + + | str | + + | str1str2 | + + 2.CONCAT_WS(x, s1,s2...sn) ...
分类:
数据库 时间:
2021-04-28 12:13:16
阅读次数:
0
写一个java文件 public static void main(String[] args) { String str1="abc"; String str2 ="abc"; String str3=new String("abc"); boolean b1= str1==str2; boole ...
分类:
其他好文 时间:
2021-04-26 13:44:32
阅读次数:
0
/* 获取两个字符串中最大相同子串。比如:str1 = "abcwerthelloyuiodefabcdef";str2 = "cvhellobnm"提示:将短的那个串进行长度依次递减的子串与较长的串比较。 */ //前提:两个字符串中只有一个最大相同子串 import org.junit.Test ...
分类:
编程语言 时间:
2021-04-19 15:04:56
阅读次数:
0
int * Mystrstr(const char * str1, const char* str2) { char* p1 = NULL; char * p2 = NULL; char * cur = (char *)str1; if (*p2=='\0') { return cur; } whi ...
分类:
其他好文 时间:
2021-04-13 12:18:00
阅读次数:
0
两个: new String()和abc new出来的对象都存放在堆中 String str = "abc"是创建了一个对象 String str1 = "abc"; String str2 = "ab" + "c"; str1==str2是true 因为String str2 = "ab" + " ...
分类:
其他好文 时间:
2021-03-17 14:59:15
阅读次数:
0