The atob Library Function

NAME

atob, btoa - binary/ASCII conversion routines

SYNOPSIS

int atob (vp,p,base)
char * btoa (dst,value,base)

DESCRIPTION

atob converts the ASCII string 'p' to binary. It places the result in vp, returning 1 on success, otherwise 0. The parameter 'base' is used to specify the expected base of the value, values of 2 through 36 are supported. If the base is specified as zero, then the base is determined from the first few characters of the string as shown below:

0x hex
0t decimal
0 octal
0o octal
1-9 decimal

The function btoa converts 'value' to an ASCII string occording to the 'base' specified. The result is copied into 'dst' and returned as a pointer.

FILES

lib/atob.c


Navigation: Document Home | Document Contents | Document Index