1. Crises d'interception pures
La copie de code est la suivante:
Functioncutstr (Thestr1, strlen)
diml, t, c
l = len (thestr1)
ifl <1ThenexitFunction
t = 0
FORDXY1 = 1TOL
C = ABS (ASC (MID (Thestr1, DXY1,1))))
IFC> 255TEN
t = t + 2
autre
t = t + 1
endire
ift> = strlenthen
thev = mid (thestr1,1, dxy1)
sortie
autre
thev = thestr1
endire
suivant
Cutstr = thev
finition de fin
2. Intercepter la chaîne, utiliser des espaces pour le remplir
La copie de code est la suivante:
Functioncutstr (Thestr, strlen)
diml, t, c
L = Len (Thestr)
t = 0
FORDXY = 1TOL
C = ABS (ASC (MID (Thestr, dxy, 1))))
IFC> 255TEN
t = t + 2
autre
t = t + 1
endire
ift> = strlenthen
thev = gauche (thestr, dxy)
sortie
autre
bu = strlen-t
forbui = 1tobu
strbu = ""
strbuall = strbuall & strbu
suivant
thev = thestr & strbull
strbu = ""
strbuall = ""
endire
suivant
Cutstr = thev
finition de fin