Posts: 1,769
Threads: 410
Joined: Feb 2003
I'm trying to find out what characters are terminating a line so i can write a regex script but i cant figure out what its using.
is there a function that will give me the ascii number for each character in a string?
Posts: 12,071
Threads: 140
Joined: Dec 2002
Macro
str s="ABC[]DEF"
int i
for i 0 s.len
,out s[i]
Posts: 12,071
Threads: 140
Joined: Dec 2002
Also i often use this function:
Function
outb
;/
function !*ptr nBytes [flags] ;;flags: 1 show characters too
out _s.encrypt(8 _s.fromn(ptr nBytes) "" 1)
if(flags&1)
,str s.all(nBytes*3 2 32)
,int i c
,for(i 0 nBytes)
,,c=ptr[i]
,,if(c<32) continue
,,s[i*3+1]=c
,out s
Good for strings and for binary data.
Example
Macro
str s="ABC[]DEF"
outb s s.len 1
Here character codes are in hex
Posts: 1,769
Threads: 410
Joined: Feb 2003
thanks!
i hate unix->windows stuff!