"Fossies" - the Fresh Open Source Software Archive

Member "bas-2.6/str.h" (2 Jul 2019, 1687 Bytes) of package /linux/privat/bas-2.6.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "str.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.5_vs_2.6.

    1 #ifndef STR_H
    2 #define STR_H
    3 
    4 #include <sys/types.h>
    5 
    6 struct String
    7 {
    8   size_t length;
    9   char *character;
   10   struct StringField *field;
   11 };
   12 
   13 struct StringField
   14 {
   15   struct String **refStrings;
   16   int refCount;
   17 };
   18 
   19 extern int cistrcmp(const char *s, const char *r);
   20 
   21 extern struct String *String_new(struct String *this);
   22 extern void String_destroy(struct String *this);
   23 extern int String_joinField(struct String *this, struct StringField *field, char *character, size_t length);
   24 extern void String_leaveField(struct String *this);
   25 extern struct String *String_clone(struct String *this, const struct String *clon);
   26 extern int String_appendString(struct String *this, const struct String *app);
   27 extern int String_appendChar(struct String *this, char ch);
   28 extern int String_appendChars(struct String *this, const char *ch);
   29 extern int String_appendPrintf(struct String *this, const char *fmt, ...);
   30 extern int String_insertChar(struct String *this, size_t where, char ch);
   31 extern int String_delete(struct String *this, size_t where, size_t len);
   32 extern void String_ucase(struct String *this);
   33 extern void String_lcase(struct String *this);
   34 extern int String_size(struct String *this, size_t length);
   35 extern int String_cmp(const struct String *this, const struct String *s);
   36 extern int String_quote(struct String *this);
   37 extern void String_lset(struct String *this, const struct String *s);
   38 extern void String_rset(struct String *this, const struct String *s);
   39 extern void String_set(struct String *this, size_t pos, const struct String *s, size_t length);
   40 
   41 extern struct StringField *StringField_new(struct StringField *this);
   42 extern void StringField_destroy(struct StringField *this);
   43 
   44 #endif