Axis2/C: axutil_string.h Source File

- Main Page
- Modules
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

# axutil_string.h

    00001
    00019 #ifndef AXUTIL_STRING_H
    00020 #define AXUTIL_STRING_H
    00021
    00022 #include <axutil_utils_defines.h>
    00023 #include <axutil_error.h>
    00024 #include <axutil_env.h>
    00025 #include <string.h>
    00026
    00027 #ifdef __cplusplus
    00028 extern "C"
    00029 {
    00030 #endif
    00031
    00038     typedef struct axutil_string axutil_string_t;
    00039
    00047     AXIS2_EXTERN axutil_string_t *AXIS2_CALL
    00048     axutil_string_create(
    00049         const axutil_env_t * env,
    00050         const axis2_char_t * str);
    00051
    00059     AXIS2_EXTERN axutil_string_t *AXIS2_CALL
    00060
    00061     axutil_string_create_assume_ownership(
    00062         const axutil_env_t * env,
    00063         axis2_char_t ** str);
    00064
    00072     AXIS2_EXTERN axutil_string_t *AXIS2_CALL
    00073     axutil_string_create_const(
    00074         const axutil_env_t * env,
    00075         axis2_char_t ** str);
    00076
    00083     AXIS2_EXTERN void AXIS2_CALL
    00084     axutil_string_free(
    00085         struct axutil_string *string,
    00086         const axutil_env_t * env);
    00087
    00096     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00097     axutil_string_equals(
    00098         const struct axutil_string *string,
    00099         const axutil_env_t * env,
    00100         const struct axutil_string *string1);
    00101
    00110     AXIS2_EXTERN struct axutil_string *AXIS2_CALL
    00111                 axutil_string_clone(
    00112                     struct axutil_string *string,
    00113                     const axutil_env_t * env);
    00114
    00121     AXIS2_EXTERN const axis2_char_t *AXIS2_CALL
    00122     axutil_string_get_buffer(
    00123         const struct axutil_string *string,
    00124         const axutil_env_t * env);
    00125
    00128     AXIS2_EXTERN unsigned int AXIS2_CALL
    00129     axutil_string_get_length(
    00130         const struct axutil_string *string,
    00131         const axutil_env_t * env);
    00132
    00141     AXIS2_EXTERN void *AXIS2_CALL
    00142     axutil_strdup(
    00143         const axutil_env_t * env,
    00144         const void *ptr);
    00145
    00153     AXIS2_EXTERN void *AXIS2_CALL
    00154     axutil_strndup(
    00155         const axutil_env_t * env,
    00156         const void *ptr,
    00157         int n);
    00158
    00170     AXIS2_EXTERN void *AXIS2_CALL
    00171     axutil_strmemdup(
    00172         const void *ptr,
    00173         size_t n,
    00174         const axutil_env_t * env);
    00175
    00176     AXIS2_EXTERN void *AXIS2_CALL
    00177     axutil_memchr(
    00178         const void *ptr,
    00179         int c,
    00180         size_t n);
    00181
    00182     AXIS2_EXTERN int AXIS2_CALL
    00183     axutil_strcmp(
    00184         const axis2_char_t * s1,
    00185         const axis2_char_t * s2);
    00186
    00187     AXIS2_EXTERN int AXIS2_CALL
    00188     axutil_strncmp(
    00189         const axis2_char_t * s1,
    00190         const axis2_char_t * s2,
    00191         int n);
    00192
    00193     AXIS2_EXTERN axis2_ssize_t AXIS2_CALL
    00194     axutil_strlen(
    00195         const axis2_char_t * s);
    00196
    00197     AXIS2_EXTERN int AXIS2_CALL
    00198     axutil_strcasecmp(
    00199         const axis2_char_t * s1,
    00200         const axis2_char_t * s2);
    00201
    00202     AXIS2_EXTERN int AXIS2_CALL
    00203     axutil_strncasecmp(
    00204         const axis2_char_t * s1,
    00205         const axis2_char_t * s2,
    00206         const int n);
    00207
    00208     /* much similar to the strcat behaviour. But the difference is
    00209      * this allocates new memory to put the conatenated string rather than
    00210      * modifying the first argument. The user should free the allocated
    00211      * memory for the return value
    00212      */
    00213     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00214     axutil_stracat(
    00215         const axutil_env_t * env,
    00216         const axis2_char_t * s1,
    00217         const axis2_char_t * s2);
    00218
    00224     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00225     axutil_strcat(
    00226         const axutil_env_t * env,
    00227         ...);
    00228
    00229     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00230     axutil_strstr(
    00231         const axis2_char_t * heystack,
    00232         const axis2_char_t * needle);
    00233
    00241     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00242     axutil_strchr(
    00243         const axis2_char_t * s,
    00244         axis2_char_t ch);
    00245
    00246     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00247     axutil_rindex(
    00248         const axis2_char_t * s,
    00249         axis2_char_t c);
    00250
    00251     /* replaces s1 with s2 */
    00252     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00253     axutil_replace(
    00254         const axutil_env_t * env,
    00255         axis2_char_t * str,
    00256         int s1,
    00257         int s2);
    00258
    00259     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00260     axutil_strltrim(
    00261         const axutil_env_t * env,
    00262         const axis2_char_t * _s,
    00263         const axis2_char_t * _trim);
    00264
    00265     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00266     axutil_strrtrim(
    00267         const axutil_env_t * env,
    00268         const axis2_char_t * _s,
    00269         const axis2_char_t * _trim);
    00270
    00271     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00272     axutil_strtrim(
    00273         const axutil_env_t * env,
    00274         const axis2_char_t * _s,
    00275         const axis2_char_t * _trim);
    00276
    00284     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00285     axutil_string_replace(
    00286         axis2_char_t * str,
    00287         axis2_char_t old_char,
    00288         axis2_char_t new_char);
    00289
    00296     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00297
    00298     axutil_string_substring_starting_at(
    00299         axis2_char_t * str,
    00300         int s);
    00301
    00308     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00309     axutil_string_substring_ending_at(
    00310         axis2_char_t * str,
    00311         int e);
    00312
    00318     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00319     axutil_string_tolower(
    00320         axis2_char_t * str);
    00321
    00327     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00328     axutil_string_toupper(
    00329         axis2_char_t * str);
    00330
    00339     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00340     axutil_strcasestr(
    00341         const axis2_char_t * heystack,
    00342         const axis2_char_t * needle);
    00343
    00346 #ifdef __cplusplus
    00347 }
    00348 #endif
    00349
    00350 #endif                          /* AXIS2_STRING_H */