00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00043 #ifndef _HPSTRING_H
00044 #define _HPSTRING_H
00045
00046
00047 #ifndef _LONGLONG_DEF
00048 typedef unsigned long long ULONGLONG;
00049 typedef long long LONGLONG;
00050 #define _LONGLONG_DEF
00051 #endif
00052
00053
00054 #include <hpctype.h>
00055 #include <kos.h>
00056
00057
00059 int strlen(const char *s);
00060
00062 char *strcpy(char *dest, const char *src);
00063
00065 char *strncpy(char *dest, const char *src, size_t n);
00066
00068 char *strcat(char *dest, const char *src);
00069
00071 int strcmp(register const char *s1, register const char *s2);
00072
00074 int strncmp ( const char *s1, const char *s2, int num);
00075
00077 char *itoa(int z, char * buff, int base);
00078
00080 char *utoa(unsigned z, char * buff, int base);
00081
00083 char *lltoa(LONGLONG, char *,int base);
00084
00086 char *ulltoa(ULONGLONG, char *, int base);
00087
00094 char *upper(char *t, const char *s);
00095
00112 char *strset(char *s, int fill);
00113
00114 char *str_unquote(char *s, char c);
00115 char *strdup(const char *s);
00116
00117 char *lower(char *t, const char *s);
00118
00119 #ifndef DOXYGEN_SKIP
00120
00121
00122 char *__dtoa(double x, char *buf, char exp_sym);
00123
00124 char *xpad(char *t, char *s, int n, int left, char c);
00125
00126 int atoi_base(char *, int base);
00127 unsigned atoui_base(char *, int base);
00128 LONGLONG atoll_base(char *, int base);
00129 ULONGLONG atoull_base(char *, int base);
00130
00131 #endif
00132
00133 int atoi(char *);
00134 unsigned atoui(char *);
00135 LONGLONG atoll(char *);
00136
00137 char *
00138 ints(int z, int base);
00139
00140 char *
00141 uints(unsigned z, int base);
00142
00143
00144 ULONGLONG atoull(char *);
00145
00146
00147 double atof(const char *);
00148
00149 void* memcpy(void *out, const void *in, int n);
00150 void memcpyw(void *dest,const void *source,int nwords);
00151 void * memset (char * dest, int C, int LENGTH);
00152 void memsetw(void *dest,int value, int nwords);
00153 void *memmove(void *_dest, const void *_source, size_t nbytes);
00154
00155
00156
00157
00158 char * strchr(const char *s, int c);
00159 char * strncat(char *s1, const char * s2, size_t n);
00160 char *strrchr(const char *s, int c);
00161 size_t strcspn(const char *s1, const char *s2);
00162 char *strpbrk(const char *s1, const char *s2);
00163 char *strtok(char *s1, const char *s2);
00164 char *strstr(const char *s1, const char *s2);
00165 size_t strspn(const char *s1, const char *s2);
00166
00167
00168 #endif