1. Puras cuerdas de intercepción
La copia del código es la siguiente:
functionCutStr (thestr1, strlen)
diml, t, c
l = len (thestr1)
IFL <1ThenexitFunction
t = 0
Fordxy1 = 1Tol
C = ABS (ASC (Mid (Thestr1, Dxy1,1))))
IFC> 255THEN
t = t+2
demás
t = t+1
endif
ift> = strlenthen
thev = Mid (thestr1,1, dxy1)
salir
demás
thev = thestr1
endif
próximo
CUTSTR = theV
Función final
2. Intercepe la cadena, use espacios para llenarla
La copia del código es la siguiente:
functionCutStr (thestr, strlen)
diml, t, c
l = len (thestr)
t = 0
Fordxy = 1Tol
C = ABS (ASC (Mid (Thestr, Dxy, 1))))
IFC> 255THEN
t = t+2
demás
t = t+1
endif
ift> = strlenthen
thev = izquierda (thestr, dxy)
salir
demás
bu = strlen-t
forbui = 1tobu
strbu = ""
strbUall = strbUall & strbu
próximo
thev = thestr & strbull
strbu = ""
strbUall = ""
endif
próximo
CUTSTR = theV
Función final