HPGCC3 Documentation 3.0 R003

string.h File Reference

Standard String functions. More...

#include <ctype.h>
#include <kos.h>

Go to the source code of this file.

Defines

#define _LONGLONG_DEF
#define itoa(z, buff, base)   lltoa((long long)z,buff,base)
 Convert int to a string with specific base.
#define utoa(z, buff, base)   ulltoa((unsigned long long)z,buff,base)
#define strupr(str)   upper(str,str)
#define atoi(str)   ((int)atoll_base(str,10))
#define atoi_base(str, base)   ((int)atoll_base(str,base))
#define atoui(str)   ((unsigned int)atoull_base(str,10))
#define atoui_base(str, base)   ((unsigned int)atoull_base(str,base))
#define atoll(str)   atoll_base(str,10)
#define atoll_base(str, base)   atoll_base(str,base)
#define atoull(str)   ((unsigned long long)atoll_base(str,10))
#define atoull_base(str, base)   ((unsigned long long)atoll_base(str,base))

Typedefs

typedef unsigned long long ULONGLONG
typedef long long LONGLONG

Functions

int strlen (const char *s)
 Length of s.
char * strcpy (char *dest, const char *src)
 Copy source to destination.
char * strncpy (char *dest, const char *src, size_t n)
 Copy n chars of src in dest.
char * strcat (char *dest, const char *src)
 Append source after enf of destination. */.
int strcmp (register const char *s1, register const char *s2)
 Compare s1 and s2 (<0 ==0 or >0)
int strncmp (const char *s1, const char *s2, int num)
 Compare n chars of s1 and s2 (<0 ==0 or >0)
char * lltoa (LONGLONG, char *, int base)
char * ulltoa (ULONGLONG, char *, int base)
char * upper (char *t, const char *s)
char * strset (char *s, int fill)
 Set a string to a constant char fill or random in ['a'..'z'] if fill is zero.
char * str_unquote (char *s, char c)
char * strdup (const char *s)
char * lower (char *t, const char *s)
char * __dtoa (double x, char *buf, char exp_sym)
char * xpad (char *t, char *s, int n, int left, char c)
LONGLONG atoll_base (const char *, int base)
char * _str2ull (const char *number, unsigned long long *result, int base)
double atof (const char *)
void * memcpy (void *out, const void *in, int n)
void memcpyw (void *dest, const void *source, int nwords)
void * memset (char *dest, int C, int LENGTH)
void memsetw (void *dest, int value, int nwords)
void * memmove (void *_dest, const void *_source, size_t nbytes)
char * strchr (const char *s, int c)
char * strncat (char *s1, const char *s2, size_t n)
char * strrchr (const char *s, int c)
size_t strcspn (const char *s1, const char *s2)
char * strpbrk (const char *s1, const char *s2)
char * strtok (char *s1, const char *s2)
char * strstr (const char *s1, const char *s2)
size_t strspn (const char *s1, const char *s2)

Detailed Description

Standard String functions.

Definition in file string.h.


Define Documentation

#define _LONGLONG_DEF

Definition at line 23 of file string.h.

#define atoi (   str)    ((int)atoll_base(str,10))

Definition at line 109 of file string.h.

#define atoi_base (   str,
  base 
)    ((int)atoll_base(str,base))

Definition at line 110 of file string.h.

#define atoll (   str)    atoll_base(str,10)

Definition at line 114 of file string.h.

#define atoll_base (   str,
  base 
)    atoll_base(str,base)

Definition at line 115 of file string.h.

#define atoui (   str)    ((unsigned int)atoull_base(str,10))

Definition at line 111 of file string.h.

#define atoui_base (   str,
  base 
)    ((unsigned int)atoull_base(str,base))

Definition at line 112 of file string.h.

#define atoull (   str)    ((unsigned long long)atoll_base(str,10))

Definition at line 116 of file string.h.

#define atoull_base (   str,
  base 
)    ((unsigned long long)atoll_base(str,base))

Definition at line 117 of file string.h.

#define itoa (   z,
  buff,
  base 
)    lltoa((long long)z,buff,base)

Convert int to a string with specific base.

Definition at line 51 of file string.h.

#define strupr (   str)    upper(str,str)

Definition at line 71 of file string.h.

#define utoa (   z,
  buff,
  base 
)    ulltoa((unsigned long long)z,buff,base)

Definition at line 56 of file string.h.


Typedef Documentation

typedef long long LONGLONG

Definition at line 22 of file string.h.

typedef unsigned long long ULONGLONG

Definition at line 21 of file string.h.


Function Documentation

char* __dtoa ( double  x,
char *  buf,
char  exp_sym 
)
char* _str2ull ( const char *  number,
unsigned long long *  result,
int  base 
)
double atof ( const char *  )
LONGLONG atoll_base ( const char *  ,
int  base 
)
char* lltoa ( LONGLONG  ,
char *  ,
int  base 
)
char* lower ( char *  t,
const char *  s 
)
void* memcpy ( void *  out,
const void *  in,
int  n 
)
void memcpyw ( void *  dest,
const void *  source,
int  nwords 
)
void* memmove ( void *  _dest,
const void *  _source,
size_t  nbytes 
)
void* memset ( char *  dest,
int  C,
int  LENGTH 
)
void memsetw ( void *  dest,
int  value,
int  nwords 
)
char* str_unquote ( char *  s,
char  c 
)
char* strcat ( char *  dest,
const char *  src 
)

Append source after enf of destination. */.

char* strchr ( const char *  s,
int  c 
)
int strcmp ( register const char *  s1,
register const char *  s2 
)

Compare s1 and s2 (<0 ==0 or >0)

char* strcpy ( char *  dest,
const char *  src 
)

Copy source to destination.

size_t strcspn ( const char *  s1,
const char *  s2 
)
char* strdup ( const char *  s)
int strlen ( const char *  s)

Length of s.

char* strncat ( char *  s1,
const char *  s2,
size_t  n 
)
int strncmp ( const char *  s1,
const char *  s2,
int  num 
)

Compare n chars of s1 and s2 (<0 ==0 or >0)

char* strncpy ( char *  dest,
const char *  src,
size_t  n 
)

Copy n chars of src in dest.

char* strpbrk ( const char *  s1,
const char *  s2 
)
char* strrchr ( const char *  s,
int  c 
)
char * strset ( char *  s,
int  fill 
)

Set a string to a constant char fill or random in ['a'..'z'] if fill is zero.

Parameters:
spointer to string to be set
fillthe value to fill in, zero means random
Return values:
pointerto string s
size_t strspn ( const char *  s1,
const char *  s2 
)
char* strstr ( const char *  s1,
const char *  s2 
)
char* strtok ( char *  s1,
const char *  s2 
)
char* ulltoa ( ULONGLONG  ,
char *  ,
int  base 
)
char* upper ( char *  t,
const char *  s 
)
char* xpad ( char *  t,
char *  s,
int  n,
int  left,
char  c 
)