XSMutableString Reference

File
XSFoundation/include/XS/Classes/XSMutableString.h
Author
Jean-David Gadina - www.xs-labs.com
Copyright
© (c) 2020 - Jean-David Gadina - www.xs-labs.com
Date
Sunday, September 27, 2020

Overview

XSString class

Tasks

XSStringAppend

Appends a string to a mutable string

XS_EXPORT void XSStringAppend( XSStringRef str, XSStringRef append );

Parameters
  • str
    The mutable string
  • append
    The string to append

XSStringAppendBytes

Appends bytes to a mutable string

XS_EXPORT void XSStringAppendBytes( XSStringRef str, const uint8_t *bytes, size_t length );

Parameters
  • str
    The mutable string
  • bytes
    The bytes to append
  • length
    The number of bytes to append

XSStringAppendCString

Appends a C string to a mutable string

XS_EXPORT void XSStringAppendCString( XSStringRef str, const char *cstr );

Parameters
  • str
    The mutable string
  • cstr
    The C string to append

XSStringAppendFormat

Appends a format string to a mutable string

XS_EXPORT void XSStringAppendFormat( XSStringRef str, const char *fmt, ... );

Parameters
  • str
    The mutable string
  • fmt
    The format string
  • ...
    Arguments for the format string

XSStringAppendFormatAndArguments

Appends a format string to a mutable string

XS_EXPORT void XSStringAppendFormatAndArguments( XSStringRef str, const char *fmt, va_list ap );

Parameters
  • str
    The mutable string
  • fmt
    The format string
  • ap
    Arguments for the format string

XSStringCreateMutable

Creates an empty mutable string

XS_EXPORT XSMutableStringRef XSStringCreateMutable( void );

Return value

An empty mutable string

XSStringCreateMutableCopy

Creates a mutable copy of a string

XS_EXPORT XSMutableStringRef XSStringCreateMutableCopy( XSStringRef str );

Parameters
  • str
    The string to copy
Return value

A mutable copy of the string

Types

XSMutableStringRef

Opaque type for XSString (mutable)

typedef struct XSString * XSMutableStringRef;