#runtime "hsp3cl" s="sdfはghききgh" #m […]
#runtime "hsp3cl" s="sdfはghききgh" #m […]
#runtime "hsp3cl" s="sdfはghききgh" #module #defcfunc getBytes str _txt txt=_txt byteMap="" isSJIS=0 repeat strlen(txt) if isSJIS: isSJIS=0: continue byte=peek(txt,cnt) if 129<=byte&byte<=159 | 224<=byte&byte<=252 { isSJIS=1 byteMap+="2" } else { byteMap+="1" } loop return byteMap #defcfunc strIndex str _txt,str _byteMap,int index txt=_txt: byteMap=_byteMap bIndex=-1 dim bSize repeat index+1 bSize=int(strmid(byteMap,cnt,1)) bIndex+=bSize loop if bSize=2: bIndex-1 return strmid(txt,bIndex,bSize) #global b=getBytes(s) mes b mes strIndex(s,b,6)