标签:class message rcp div 字符串 eps decode color return
def oneReplace(mystr,Findstr,Repstr): #Findstr=Findstr.decode(‘utf-8‘).encode(‘gb18030‘) idx=mystr.find(Findstr) strlen=len(Findstr.decode(‘utf-8‘)) arcpy.AddMessage("idx:"+str(idx)+":"+Findstr+"长度:"+str(strlen)) if idx<0: return mystr return mystr[0:idx]+Repstr+mystr[idx+strlen:]
标签:class message rcp div 字符串 eps decode color return
原文地址:https://www.cnblogs.com/gisoracle/p/10946786.html