'''题一:判断列表中含有字符串且组成新的列表打印输出知识点:列表.列表的增删改查.for循环.if判断'''#@Author:Dotest软件测试#@QQ:1274057839names = ['Dotest','test','donghao',100,True]#定义空列表:容器:思考:为什么不放在for循环里面定义?str_name = []#for循环for name in names: #if判断:函数:isinstance是判断是否为某类型 if isinstance(name,st…
1.单纯的Unicode 转码 String a = "\u53ef\u4ee5\u6ce8\u518c"; a = new String(a.getBytes("UTF-16"),"Unicode"); 2.String 字符串中含有 Unicode 编码时,转为UTF-8 public static String decodeUnicode(String theString) { char aChar; int len = theString…
bat 判断变量字符串中是否包含字符串 @echo off rem way 1 set str=machine-order-service set matchStr=orderd echo %str% | findstr %matchStr% >nul && echo yes || echo no rem end way 1 pause rem way 2 setLocal EnableDelayedExpansion if not "x!str:%matchStr%=!&…