57typedef struct StringInterface StringInterface;
98struct StringInterface {
103 ObjectInterface objectInterface;
124 Array *(*componentsSeparatedByCharacters)(
const String *self,
const char *chars);
186 String *(*initWithCharacters)(
String *self,
const char *chars);
218 String *(*initWithFormat)(
String *self,
const char *fmt, ...);
242 String *(*initWithVaList)(
String *self,
const char *fmt, va_list args);
302 String *(*stringWithCharacters)(
const char *chars);
334 String *(*stringWithFormat)(
const char *fmt, ...);
346 String *(*stringWithMemory)(
const ident mem,
size_t length);
static _Bool writeToFile(const Data *self, const char *path)
static Order compareTo(const Date *self, const Date *other)
static MutableData * data(void)
static MutableString * string(void)
static Range rangeOfString(const String *self, const String *string, const Range range)
static _Bool hasPrefix(const String *self, const String *prefix)
static Range rangeOfCharacters(const String *self, const char *chars, const Range range)
static _Bool hasSuffix(const String *self, const String *suffix)
StringEncoding
Character encodings for Strings.
@ STRING_ENCODING_MACROMAN
OBJECTIVELY_EXPORT char * strtrim(const char *s)
Copies the given null-terminated C string, trimming leading and trailing whitespace.
wchar_t Unicode
The Unicode type.
void * ident
The identity type, similar to Objective-C id.
#define OBJECTIVELY_EXPORT
Order
Comparison constants.
The runtime representation of a Class.
Object is the root Class of The Objectively Class hierarchy.
A location and length into contiguous collections.
char * chars
The backing null-terminated UTF-8 encoded character array.
StringInterface * interface
The interface.
size_t length
The length of the String in bytes.
OBJECTIVELY_EXPORT StringEncoding StringEncodingForName(const char *name)
OBJECTIVELY_EXPORT const char * NameForStringEncoding(StringEncoding encoding)
Object object
The superclass.
Class * _String(void)
The String archetype.
OBJECTIVELY_EXPORT String * str(const char *fmt,...)
A convenience function for instantiating Strings.
OBJECTIVELY_EXPORT Order StringCompare(const ident a, const ident b)
A Comparator for sorting Strings.