This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dongxiaoyan-tsg-autotest/04-CustomLibrary/Custometest/Common.py

14 lines
482 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import json
#判断一个字符或字符串是否包含于另一个字符串:a是否再b中是否则返回True否则返回Falsle
def aisincludeb(a,b):
result = a in b
print(result)
return result
#删除字符串当前前几个或后几个sourcestr源串a[2:-2] 表示去掉前面两个和后面两个如果光去掉后面的a[:-2]
def removeBeforOrAfter(sourcestr,a):
#a = "16541616584984"
#a = a[2:-2]
sourcestr = sourcestr[a]
return result