# 打印每个o出现的位置 str1 = "hellopythonhelloworld" str2 = 'hellopythonhelloworld' str3 = 'hellopythonhelloworl' index = 0 for i in str1: if i == 'o': print(i ...
分类:
其他好文 时间:
2021-01-11 10:40:33
阅读次数:
0
问题 求两个字符串的 LCS ?度: 输?: str1 = "abcde", str2 = "ace" 输出: 3 解释: 最?公共?序列是 "ace",它的?度是 3 思路 对于两个字符串的动态规划问题,?般来说都是定义 DP table,容易写出状态转移?程, dp[i][j] 的状态可以通过之 ...
分类:
其他好文 时间:
2021-01-01 12:21:19
阅读次数:
0
作者:Mazin 来源:my.oschina.net/u/3441184/blog/887152 首先我们来看一段代码: public class InternTest { public static void main(String[] args) { String str1 = new Stri ...
分类:
其他好文 时间:
2020-12-30 11:23:27
阅读次数:
0
# 1. python【字典】转json格式【str】 import json dic = {'a': 1, 'b': 2, 'c': 3} str1 = json.dumps(dic, sort_keys=True, indent=4, separators=(',', ':')) str2 = ...
分类:
编程语言 时间:
2020-12-30 11:14:48
阅读次数:
0
1. len 字符串长度 len(str1) 2. 字符串遍历(感觉是将字符串当做列表看,待验证) r = []rune(str1) 3. 字符串转整数(不知道有什么用) strconv.Atoi(str1) 4. 整数转字符串 strconv.Itoa(int1) 5. 字符串转byte 6. b ...
分类:
其他好文 时间:
2020-12-21 11:26:01
阅读次数:
0
1.find() 返回值为目标元素的下标,若不存在目标元素则返回-1 #include<iostream> using namespace std; int main() { string str1 = "A BC", str2 = "abc"; char c = '5'; int i; i= st ...
分类:
其他好文 时间:
2020-12-19 13:09:58
阅读次数:
2
CONCATENATE '无权限' p_str INTO msg. p_str = |{ p_str1 }'啊'|. LEAVE TO TRANSACTION sy-tcode. SELECTION-SCREEN: BEGIN OF BLOCK b01 WITH FRAME TITLE TEXT-0 ...
分类:
其他好文 时间:
2020-11-24 12:05:51
阅读次数:
9
分别模拟实现库函数1.strcat2.strcmp3.strcpy4.srelen
分类:
其他好文 时间:
2020-11-23 11:44:39
阅读次数:
8
concat()函数 1. 功能: 返回结果为连接参数产生的字符串。如有任何一个参数为NULL ,则返回值为 NULL。 2. 语法 concat(str1, str2,...) 3. 例子 案例一: mysql> select concat('苹果','香蕉','梨子'); + + | CONCA ...
分类:
数据库 时间:
2020-11-19 12:24:20
阅读次数:
12
(1)String str1=new String("A"+"B") ; 会创建几个对象 ? "a"在字符串常量池创建,这是第一个对象 "b"在字符串常量池创建,这是第二个对象 “a”+"b"组合"ab"在字符串常量池创建,这是第三个对象 new String(),在堆中分配内存,里面存着这字符串" ...
分类:
编程语言 时间:
2020-11-19 12:03:53
阅读次数:
5