Archive for 22 8 月, 2018

新的strchr/strrchr/ClipFilename/ClipLastPathname函数

22 8 月, 2018

参见范例Example.DataType.StrCharTest

str: “hello,world!”
strchr(str,’,’) return “,world!”
strrchr(str,strlen(str),’,’) return “,world!”
strchr(str,”el”,2) return “ello,world!”
strrchr(str,strlen(str),”el”,2) return “ld!”
strrchr(str,strlen(str),3,’l’) return “lo,world!”
strrchr(str,strlen(str),3,”el”,2) return “lo,world!”
ClipFilename(“C:\1.txt”) return “1.txt”
ClipLastPathname(“C:\1\2”) return “2”
ClipLastPathname(“C:\1\2\”) return “2”
ClipLastPathname(“C:\1\2\\”) return “2”

鄂ICP备09027626号