JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | List of all members
Steinberg::String Class Reference

String. More...

#include "fstring.h"

Inheritance diagram for Steinberg::String:
Steinberg::ConstString Steinberg::StringObject

Public Types

enum  CharGroup { kSpace , kNotAlphaNum , kNotAlpha }
 
- Public Types inherited from Steinberg::ConstString
enum  CompareMode { kCaseSensitive , kCaseInsensitive }
 

Public Member Functions

 String (const char8 *str, MBCodePage codepage, int32 n=-1, bool isTerminated=true)
 assign n characters of str and convert to wide string by using the specified codepage
 
 String (const char8 *str, int32 n=-1, bool isTerminated=true)
 assign n characters of str (-1: all)
 
 String (const char16 *str, int32 n=-1, bool isTerminated=true)
 assign n characters of str (-1: all)
 
 String (const String &str, int32 n=-1)
 assign n characters of str (-1: all)
 
 String (const ConstString &str, int32 n=-1)
 assign n characters of str (-1: all)
 
 String (const FVariant &var)
 assign from FVariant
 
 String (IString *str)
 assign from IString
 
void updateLength ()
 Call this when the string is truncated outside (not recommended though)
 
const char8 * text8 () const SMTG_OVERRIDE
 Returns pointer to string of type char8.
 
const char16 * text16 () const SMTG_OVERRIDE
 Returns pointer to string of type char16.
 
char8 getChar8 (uint32 index) const SMTG_OVERRIDE
 Returns character of type char16 at 'index'.
 
char16 getChar16 (uint32 index) const SMTG_OVERRIDE
 Returns character of type char8 at 'index'.
 
bool setChar8 (uint32 index, char8 c)
 
bool setChar16 (uint32 index, char16 c)
 
bool setChar (uint32 index, char8 c)
 
bool setChar (uint32 index, char16 c)
 
Stringoperator= (const char8 *str)
 Assign from a string of type char8.
 
Stringoperator= (const char16 *str)
 
Stringoperator= (const ConstString &str)
 
Stringoperator= (const String &str)
 
Stringoperator= (char8 c)
 
Stringoperator= (char16 c)
 
Stringassign (const ConstString &str, int32 n=-1)
 Assign n characters of str (-1: all)
 
Stringassign (const char8 *str, int32 n=-1, bool isTerminated=true)
 Assign n characters of str (-1: all)
 
Stringassign (const char16 *str, int32 n=-1, bool isTerminated=true)
 Assign n characters of str (-1: all)
 
Stringassign (char8 c, int32 n=1)
 
Stringassign (char16 c, int32 n=1)
 
Stringappend (const ConstString &str, int32 n=-1)
 Append n characters of str to this (n=-1: all)
 
Stringappend (const char8 *str, int32 n=-1)
 Append n characters of str to this (n=-1: all)
 
Stringappend (const char16 *str, int32 n=-1)
 Append n characters of str to this (n=-1: all)
 
Stringappend (const char8 c, int32 n=1)
 Append char c n times.
 
Stringappend (const char16 c, int32 n=1)
 Append char c n times.
 
StringinsertAt (uint32 idx, const ConstString &str, int32 n=-1)
 Insert n characters of str at position idx (n=-1: all)
 
StringinsertAt (uint32 idx, const char8 *str, int32 n=-1)
 Insert n characters of str at position idx (n=-1: all)
 
StringinsertAt (uint32 idx, const char16 *str, int32 n=-1)
 Insert n characters of str at position idx (n=-1: all)
 
StringinsertAt (uint32 idx, char8 c)
 
StringinsertAt (uint32 idx, char16 c)
 
Stringoperator+= (const String &str)
 
Stringoperator+= (const ConstString &str)
 
Stringoperator+= (const char8 *str)
 
Stringoperator+= (const char16 *str)
 
Stringoperator+= (const char8 c)
 
Stringoperator+= (const char16 c)
 
Stringreplace (uint32 idx, int32 n1, const ConstString &str, int32 n2=-1)
 Replace n1 characters of this (starting at idx) with n2 characters of str (n1,n2=-1: until end)
 
Stringreplace (uint32 idx, int32 n1, const char8 *str, int32 n2=-1)
 Replace n1 characters of this (starting at idx) with n2 characters of str (n1,n2=-1: until end)
 
Stringreplace (uint32 idx, int32 n1, const char16 *str, int32 n2=-1)
 Replace n1 characters of this (starting at idx) with n2 characters of str (n1,n2=-1: until end)
 
int32 replace (const char8 *toReplace, const char8 *toReplaceWith, bool all=false, CompareMode m=kCaseSensitive)
 Replace find string with replace string - returns number of replacements.
 
int32 replace (const char16 *toReplace, const char16 *toReplaceWith, bool all=false, CompareMode m=kCaseSensitive)
 Replace find string with replace string - returns number of replacements.
 
bool replaceChars8 (const char8 *toReplace, char8 toReplaceBy)
 Returns true when any replacement was done.
 
bool replaceChars16 (const char16 *toReplace, char16 toReplaceBy)
 
bool replaceChars8 (char8 toReplace, char8 toReplaceBy)
 
bool replaceChars16 (char16 toReplace, char16 toReplaceBy)
 
bool replaceChars (char8 toReplace, char8 toReplaceBy)
 
bool replaceChars (char16 toReplace, char16 toReplaceBy)
 
bool replaceChars (const char8 *toReplace, char8 toReplaceBy)
 
bool replaceChars (const char16 *toReplace, char16 toReplaceBy)
 
Stringremove (uint32 index=0, int32 n=-1)
 Remove n characters from string starting at index (n=-1: until end)
 
bool trim (CharGroup mode=kSpace)
 Trim lead/trail.
 
void removeChars (CharGroup mode=kSpace)
 Removes all of group.
 
bool removeChars8 (const char8 *which)
 Remove all occurrences of each char in 'which'.
 
bool removeChars16 (const char16 *which)
 Remove all occurrences of each char in 'which'.
 
bool removeChars8 (const char8 which)
 
bool removeChars16 (const char16 which)
 
bool removeChars (const char8 *which)
 
bool removeChars (const char16 *which)
 
bool removeChars (const char8 which)
 
bool removeChars (const char16 which)
 
bool removeSubString (const ConstString &subString, bool allOccurences=true)
 
Stringprintf (const char8 *format,...)
 Print formatted data into string.
 
Stringprintf (const char16 *format,...)
 Print formatted data into string.
 
Stringvprintf (const char8 *format, va_list args)
 
Stringvprintf (const char16 *format, va_list args)
 
StringprintInt64 (int64 value)
 
StringprintFloat (double value, uint32 maxPrecision=6)
 print a float into a string, trailing zeros will be trimmed
 
bool incrementTrailingNumber (uint32 width=2, tchar separator=STR(' '), uint32 minNumber=1, bool applyOnlyFormat=false)
 Increment the trailing number if present else start with minNumber, width specifies the string width format (width 2 for number 3 is 03), applyOnlyFormat set to true will only format the string to the given width without incrementing the founded trailing number.
 
bool fromVariant (const FVariant &var)
 Assigns string from FVariant.
 
void toVariant (FVariant &var) const
 
bool fromAttributes (IAttributes *a, IAttrID attrID)
 Assigns string from FAttributes.
 
bool toAttributes (IAttributes *a, IAttrID attrID)
 
void swapContent (String &s)
 Swaps ownership of the strings pointed to.
 
void take (String &str)
 Take ownership of the string of 'str'.
 
void take (void *_buffer, bool wide)
 Take ownership of buffer.
 
void * pass ()
 
void passToVariant (FVariant &var)
 Pass ownership of buffer to Variant - sets Variant ownership.
 
void toLower (uint32 index)
 Lower case the character.
 
void toLower ()
 Lower case the string.
 
void toUpper (uint32 index)
 Upper case the character.
 
void toUpper ()
 Upper case the string.
 
unsigned chartoPascalString (unsigned char *buf)
 Pascal string conversion.
 
const StringfromPascalString (const unsigned char *buf)
 Pascal string conversion.
 
bool toWideString (uint32 sourceCodePage=kCP_Default)
 Converts to wide string according to sourceCodePage.
 
bool toMultiByte (uint32 destCodePage=kCP_Default)
 
void fromUTF8 (const char8 *utf8String)
 Assigns from UTF8 string.
 
bool normalize (UnicodeNormalization=kUnicodeNormC)
 On PC only kUnicodeNormC is working.
 
- Public Member Functions inherited from Steinberg::ConstString
 ConstString (const char8 *str, int32 length=-1)
 Assign from string of type char8 (length=-1: all)
 
 ConstString (const char16 *str, int32 length=-1)
 Assign from string of type char16 (length=-1: all)
 
 ConstString (const ConstString &str, int32 offset=0, int32 length=-1)
 Copy constructor (length=-1: all).
 
 ConstString (const FVariant &var)
 Assign a string from FVariant.
 
virtual ~ConstString ()
 Destructor.
 
virtual int32 length () const
 Return length of string.
 
bool isEmpty () const
 Return true if string is empty.
 
 operator const char8 * () const
 Returns pointer to string of type char8 (no modification allowed)
 
 operator const char16 * () const
 Returns pointer to string of type char16(no modification allowed)
 
tchar operator[] (short idx) const
 Returns character at 'idx'.
 
tchar operator[] (long idx) const
 
tchar operator[] (int idx) const
 
tchar operator[] (unsigned short idx) const
 
tchar operator[] (unsigned long idx) const
 
tchar operator[] (unsigned int idx) const
 
virtual const tchar * text () const
 Returns pointer to string of type tchar.
 
virtual const void * ptr () const
 Returns pointer to string of type void.
 
tchar getChar (uint32 index) const
 Returns character of type tchar at 'index'.
 
tchar getCharAt (uint32 index) const
 Returns character of type tchar at 'index', no conversion!
 
bool testChar8 (uint32 index, char8 c) const
 Returns true if character is equal at position 'index'.
 
bool testChar16 (uint32 index, char16 c) const
 
bool testChar (uint32 index, char8 c) const
 
bool testChar (uint32 index, char16 c) const
 
bool extract (String &result, uint32 idx, int32 n=-1) const
 Get n characters long substring starting at index (n=-1: until end)
 
int32 copyTo8 (char8 *str, uint32 idx=0, int32 n=-1) const
 
int32 copyTo16 (char16 *str, uint32 idx=0, int32 n=-1) const
 
int32 copyTo (tchar *str, uint32 idx=0, int32 n=-1) const
 
void copyTo (IStringResult *result) const
 Copies whole member string.
 
void copyTo (IString &string) const
 Copies whole member string.
 
uint32 hash (uint32 tsize) const
 
int32 compareAt (uint32 index, const ConstString &str, int32 n=-1, CompareMode m=kCaseSensitive) const
 Compare n characters of str with n characters of this starting at index (return: see above)
 
int32 compare (const ConstString &str, int32 n, CompareMode m=kCaseSensitive) const
 Compare n characters of str with n characters of this (return: see above)
 
int32 compare (const ConstString &str, CompareMode m=kCaseSensitive) const
 Compare all characters of str with this (return: see above)
 
int32 naturalCompare (const ConstString &str, CompareMode mode=kCaseSensitive) const
 
bool startsWith (const ConstString &str, CompareMode m=kCaseSensitive) const
 Check if this starts with str.
 
bool endsWith (const ConstString &str, CompareMode m=kCaseSensitive) const
 Check if this ends with str.
 
bool contains (const ConstString &str, CompareMode m=kCaseSensitive) const
 Check if this contains str

 
int32 findLast (const ConstString &str, int32 n=-1, CompareMode m=kCaseSensitive) const
 Find last occurrence of n characters of str in this (n=-1: all)
 
int32 findLast (char8 c, CompareMode m=kCaseSensitive) const
 
int32 findLast (char16 c, CompareMode m=kCaseSensitive) const
 
int32 countOccurences (char8 c, uint32 startIndex, CompareMode=kCaseSensitive) const
 Counts occurences of c within this starting at index.
 
int32 countOccurences (char16 c, uint32 startIndex, CompareMode=kCaseSensitive) const
 
int32 getFirstDifferent (const ConstString &str, CompareMode=kCaseSensitive) const
 Returns position of first different character.
 
bool isDigit (uint32 index) const
 Returns true if character at position is a digit.
 
bool scanFloat (double &value, uint32 offset=0, bool scanToEnd=true) const
 Converts string to double value starting at offset.
 
bool scanInt64 (int64 &value, uint32 offset=0, bool scanToEnd=true) const
 Converts string to int64 value starting at offset.
 
bool scanUInt64 (uint64 &value, uint32 offset=0, bool scanToEnd=true) const
 Converts string to uint64 value starting at offset.
 
bool scanInt32 (int32 &value, uint32 offset=0, bool scanToEnd=true) const
 Converts string to int32 value starting at offset.
 
bool scanUInt32 (uint32 &value, uint32 offset=0, bool scanToEnd=true) const
 Converts string to uint32 value starting at offset.
 
bool scanHex (uint8 &value, uint32 offset=0, bool scanToEnd=true) const
 Converts string to hex/uint8 value starting at offset.
 
int32 getTrailingNumberIndex (uint32 width=0) const
 Returns start index of trailing number.
 
int64 getTrailingNumber (int64 fallback=0) const
 Returns result of scanInt64 or the fallback.
 
int64 getNumber () const
 Returns result of scanInt64.
 
void toVariant (FVariant &var) const
 
bool isWideString () const
 Returns true if string is wide.
 
bool isAsciiString () const
 Checks if all characters in string are in ascii range.
 
bool isNormalized (UnicodeNormalization=kUnicodeNormC)
 On PC only kUnicodeNormC is working.
 
int32 findFirst (const ConstString &str, int32 n=-1, CompareMode m=kCaseSensitive, int32 endIndex=-1) const
 
int32 findFirst (char8 c, CompareMode m=kCaseSensitive, int32 endIndex=-1) const
 
int32 findFirst (char16 c, CompareMode m=kCaseSensitive, int32 endIndex=-1) const
 
int32 findNext (int32 startIndex, const ConstString &str, int32 n=-1, CompareMode=kCaseSensitive, int32 endIndex=-1) const
 
int32 findNext (int32 startIndex, char8 c, CompareMode=kCaseSensitive, int32 endIndex=-1) const
 
int32 findNext (int32 startIndex, char16 c, CompareMode=kCaseSensitive, int32 endIndex=-1) const
 
int32 findPrev (int32 startIndex, const ConstString &str, int32 n=-1, CompareMode=kCaseSensitive) const
 
int32 findPrev (int32 startIndex, char8 c, CompareMode=kCaseSensitive) const
 
int32 findPrev (int32 startIndex, char16 c, CompareMode=kCaseSensitive) const
 

Protected Member Functions

bool resize (uint32 newSize, bool wide, bool fill=false)
 

Additional Inherited Members

- Static Public Member Functions inherited from Steinberg::ConstString
static bool isCharSpace (char8 character)
 Returns true if character is a space.
 
static bool isCharSpace (char16 character)
 Returns true if character is a space.
 
static bool isCharAlpha (char8 character)
 Returns true if character is an alphabetic character.
 
static bool isCharAlpha (char16 character)
 Returns true if character is an alphabetic character.
 
static bool isCharAlphaNum (char8 character)
 Returns true if character is an alphanumeric character.
 
static bool isCharAlphaNum (char16 character)
 Returns true if character is an alphanumeric character.
 
static bool isCharDigit (char8 character)
 Returns true if character is a number.
 
static bool isCharDigit (char16 character)
 Returns true if character is a number.
 
static bool isCharAscii (char8 character)
 Returns true if character is in ASCII range.
 
static bool isCharAscii (char16 character)
 Returns true if character is in ASCII range.
 
static bool isCharUpper (char8 character)
 
static bool isCharUpper (char16 character)
 
static bool isCharLower (char8 character)
 
static bool isCharLower (char16 character)
 
static bool scanInt64_8 (const char8 *text, int64 &value, bool scanToEnd=true)
 Converts string of type char8 to int64 value.
 
static bool scanInt64_16 (const char16 *text, int64 &value, bool scanToEnd=true)
 Converts string of type char16 to int64 value.
 
static bool scanInt64 (const tchar *text, int64 &value, bool scanToEnd=true)
 Converts string of type tchar to int64 value.
 
static bool scanUInt64_8 (const char8 *text, uint64 &value, bool scanToEnd=true)
 Converts string of type char8 to uint64 value.
 
static bool scanUInt64_16 (const char16 *text, uint64 &value, bool scanToEnd=true)
 Converts string of type char16 to uint64 value.
 
static bool scanUInt64 (const tchar *text, uint64 &value, bool scanToEnd=true)
 Converts string of type tchar to uint64 value.
 
static bool scanInt32_8 (const char8 *text, int32 &value, bool scanToEnd=true)
 Converts string of type char8 to int32 value.
 
static bool scanInt32_16 (const char16 *text, int32 &value, bool scanToEnd=true)
 Converts string of type char16 to int32 value.
 
static bool scanInt32 (const tchar *text, int32 &value, bool scanToEnd=true)
 Converts string of type tchar to int32 value.
 
static bool scanUInt32_8 (const char8 *text, uint32 &value, bool scanToEnd=true)
 Converts string of type char8 to int32 value.
 
static bool scanUInt32_16 (const char16 *text, uint32 &value, bool scanToEnd=true)
 Converts string of type char16 to int32 value.
 
static bool scanUInt32 (const tchar *text, uint32 &value, bool scanToEnd=true)
 Converts string of type tchar to int32 value.
 
static bool scanHex_8 (const char8 *text, uint8 &value, bool scanToEnd=true)
 Converts string of type char8 to hex/unit8 value.
 
static bool scanHex_16 (const char16 *text, uint8 &value, bool scanToEnd=true)
 Converts string of type char16 to hex/unit8 value.
 
static bool scanHex (const tchar *text, uint8 &value, bool scanToEnd=true)
 Converts string of type tchar to hex/unit8 value.
 
static char8 toLower (char8 c)
 Converts to lower case.
 
static char8 toUpper (char8 c)
 Converts to upper case.
 
static char16 toLower (char16 c)
 
static char16 toUpper (char16 c)
 
static int32 multiByteToWideString (char16 *dest, const char8 *source, int32 wcharCount, uint32 sourceCodePage=kCP_Default)
 If dest is zero, this returns the maximum number of bytes needed to convert source.
 
static int32 wideStringToMultiByte (char8 *dest, const char16 *source, int32 char8Count, uint32 destCodePage=kCP_Default)
 If dest is zero, this returns the maximum number of bytes needed to convert source.
 
- Protected Attributes inherited from Steinberg::ConstString
union { 
 
void * buffer
 
char8 * buffer8
 
char16 * buffer16
 
};  
 
uint32 len: 30
 
uint32 isWide: 1
 

Detailed Description

String.

Extends class ConstString by operations which allow modifications.

See also
ConstString

Definition at line 312 of file fstring.h.

Member Enumeration Documentation

◆ CharGroup

enum Steinberg::String::CharGroup

Definition at line 401 of file fstring.h.

Constructor & Destructor Documentation

◆ String() [1/8]

Steinberg::String::String ( )

Definition at line 2002 of file fstring.cpp.

◆ String() [2/8]

Steinberg::String::String ( const char8 *  str,
MBCodePage  codepage,
int32  n = -1,
bool  isTerminated = true 
)

assign n characters of str and convert to wide string by using the specified codepage

Definition at line 2008 of file fstring.cpp.

◆ String() [3/8]

Steinberg::String::String ( const char8 *  str,
int32  n = -1,
bool  isTerminated = true 
)

assign n characters of str (-1: all)

Definition at line 2035 of file fstring.cpp.

◆ String() [4/8]

Steinberg::String::String ( const char16 *  str,
int32  n = -1,
bool  isTerminated = true 
)

assign n characters of str (-1: all)

Definition at line 2042 of file fstring.cpp.

◆ String() [5/8]

Steinberg::String::String ( const String str,
int32  n = -1 
)

assign n characters of str (-1: all)

Definition at line 2050 of file fstring.cpp.

◆ String() [6/8]

Steinberg::String::String ( const ConstString str,
int32  n = -1 
)

assign n characters of str (-1: all)

Definition at line 2058 of file fstring.cpp.

◆ String() [7/8]

Steinberg::String::String ( const FVariant var)

assign from FVariant

Definition at line 2066 of file fstring.cpp.

◆ String() [8/8]

Steinberg::String::String ( IString str)

assign from IString

Definition at line 2073 of file fstring.cpp.

◆ ~String()

Steinberg::String::~String ( )

Definition at line 2083 of file fstring.cpp.

Member Function Documentation

◆ append() [1/5]

String & Steinberg::String::append ( const char16 *  str,
int32  n = -1 
)

Append n characters of str to this (n=-1: all)

Definition at line 2628 of file fstring.cpp.

◆ append() [2/5]

String & Steinberg::String::append ( const char16  c,
int32  n = 1 
)

Append char c n times.

Definition at line 2697 of file fstring.cpp.

◆ append() [3/5]

String & Steinberg::String::append ( const char8 *  str,
int32  n = -1 
)

Append n characters of str to this (n=-1: all)

Definition at line 2590 of file fstring.cpp.

◆ append() [4/5]

String & Steinberg::String::append ( const char8  c,
int32  n = 1 
)

Append char c n times.

Definition at line 2663 of file fstring.cpp.

◆ append() [5/5]

String & Steinberg::String::append ( const ConstString str,
int32  n = -1 
)

Append n characters of str to this (n=-1: all)

Definition at line 2582 of file fstring.cpp.

◆ assign() [1/5]

String & Steinberg::String::assign ( char16  c,
int32  n = 1 
)

Definition at line 2565 of file fstring.cpp.

◆ assign() [2/5]

String & Steinberg::String::assign ( char8  c,
int32  n = 1 
)

Definition at line 2548 of file fstring.cpp.

◆ assign() [3/5]

String & Steinberg::String::assign ( const char16 *  str,
int32  n = -1,
bool  isTerminated = true 
)

Assign n characters of str (-1: all)

Definition at line 2521 of file fstring.cpp.

◆ assign() [4/5]

String & Steinberg::String::assign ( const char8 *  str,
int32  n = -1,
bool  isTerminated = true 
)

Assign n characters of str (-1: all)

Definition at line 2494 of file fstring.cpp.

◆ assign() [5/5]

String & Steinberg::String::assign ( const ConstString str,
int32  n = -1 
)

Assign n characters of str (-1: all)

Definition at line 2486 of file fstring.cpp.

◆ fromAttributes()

bool Steinberg::String::fromAttributes ( IAttributes a,
IAttrID  attrID 
)

Assigns string from FAttributes.

Definition at line 3586 of file fstring.cpp.

◆ fromPascalString()

const String & Steinberg::String::fromPascalString ( const unsigned char buf)

Pascal string conversion.

Definition at line 3705 of file fstring.cpp.

◆ fromUTF8()

void Steinberg::String::fromUTF8 ( const char8 *  utf8String)

Assigns from UTF8 string.

Definition at line 2246 of file fstring.cpp.

◆ fromVariant()

bool Steinberg::String::fromVariant ( const FVariant var)

Assigns string from FVariant.

Definition at line 3546 of file fstring.cpp.

◆ getChar16()

char16 Steinberg::String::getChar16 ( uint32  index) const
virtual

Returns character of type char8 at 'index'.

Reimplemented from Steinberg::ConstString.

Definition at line 668 of file fstring.h.

◆ getChar8()

char8 Steinberg::String::getChar8 ( uint32  index) const
virtual

Returns character of type char16 at 'index'.

Reimplemented from Steinberg::ConstString.

Definition at line 659 of file fstring.h.

◆ incrementTrailingNumber()

bool Steinberg::String::incrementTrailingNumber ( uint32  width = 2,
tchar  separator = STR (' '),
uint32  minNumber = 1,
bool  applyOnlyFormat = false 
)

Increment the trailing number if present else start with minNumber, width specifies the string width format (width 2 for number 3 is 03), applyOnlyFormat set to true will only format the string to the given width without incrementing the founded trailing number.

Definition at line 3395 of file fstring.cpp.

◆ insertAt() [1/5]

String & Steinberg::String::insertAt ( uint32  idx,
char16  c 
)

Definition at line 371 of file fstring.h.

◆ insertAt() [2/5]

String & Steinberg::String::insertAt ( uint32  idx,
char8  c 
)

Definition at line 370 of file fstring.h.

◆ insertAt() [3/5]

String & Steinberg::String::insertAt ( uint32  idx,
const char16 *  str,
int32  n = -1 
)

Insert n characters of str at position idx (n=-1: all)

Definition at line 2773 of file fstring.cpp.

◆ insertAt() [4/5]

String & Steinberg::String::insertAt ( uint32  idx,
const char8 *  str,
int32  n = -1 
)

Insert n characters of str at position idx (n=-1: all)

Definition at line 2737 of file fstring.cpp.

◆ insertAt() [5/5]

String & Steinberg::String::insertAt ( uint32  idx,
const ConstString str,
int32  n = -1 
)

Insert n characters of str at position idx (n=-1: all)

Definition at line 2729 of file fstring.cpp.

◆ normalize()

bool Steinberg::String::normalize ( UnicodeNormalization  n = kUnicodeNormC)

On PC only kUnicodeNormC is working.

Definition at line 2253 of file fstring.cpp.

◆ operator+=() [1/6]

String & Steinberg::String::operator+= ( const char16 *  str)

Definition at line 376 of file fstring.h.

◆ operator+=() [2/6]

String & Steinberg::String::operator+= ( const char16  c)

Definition at line 378 of file fstring.h.

◆ operator+=() [3/6]

String & Steinberg::String::operator+= ( const char8 *  str)

Definition at line 375 of file fstring.h.

◆ operator+=() [4/6]

String & Steinberg::String::operator+= ( const char8  c)

Definition at line 377 of file fstring.h.

◆ operator+=() [5/6]

String & Steinberg::String::operator+= ( const ConstString str)

Definition at line 374 of file fstring.h.

◆ operator+=() [6/6]

String & Steinberg::String::operator+= ( const String str)

Definition at line 373 of file fstring.h.

◆ operator=() [1/6]

String & Steinberg::String::operator= ( char16  c)

Definition at line 351 of file fstring.h.

◆ operator=() [2/6]

String & Steinberg::String::operator= ( char8  c)

Definition at line 350 of file fstring.h.

◆ operator=() [3/6]

String & Steinberg::String::operator= ( const char16 *  str)

Definition at line 347 of file fstring.h.

◆ operator=() [4/6]

String & Steinberg::String::operator= ( const char8 *  str)

Assign from a string of type char8.

Definition at line 346 of file fstring.h.

◆ operator=() [5/6]

String & Steinberg::String::operator= ( const ConstString str)

Definition at line 348 of file fstring.h.

◆ operator=() [6/6]

String & Steinberg::String::operator= ( const String str)

Definition at line 349 of file fstring.h.

◆ pass()

void * Steinberg::String::pass ( )

Definition at line 3640 of file fstring.cpp.

◆ passToVariant()

void Steinberg::String::passToVariant ( FVariant var)

Pass ownership of buffer to Variant - sets Variant ownership.

Definition at line 3649 of file fstring.cpp.

◆ printf() [1/2]

String & Steinberg::String::printf ( const char16 *  format,
  ... 
)

Print formatted data into string.

Definition at line 3309 of file fstring.cpp.

◆ printf() [2/2]

String & Steinberg::String::printf ( const char8 *  format,
  ... 
)

Print formatted data into string.

Definition at line 3296 of file fstring.cpp.

◆ printFloat()

String & Steinberg::String::printFloat ( double  value,
uint32  maxPrecision = 6 
)

print a float into a string, trailing zeros will be trimmed

Parameters
valuethe floating value to be printed
maxPrecision(optional) the max precision allowed for this, num of significant digits after the comma For instance printFloat (1.234, 2) => 1.23
Returns
the resulting string.

Definition at line 3354 of file fstring.cpp.

◆ printInt64()

String & Steinberg::String::printInt64 ( int64  value)

Definition at line 3339 of file fstring.cpp.

◆ remove()

String & Steinberg::String::remove ( uint32  index = 0,
int32  n = -1 
)

Remove n characters from string starting at index (n=-1: until end)

Definition at line 3035 of file fstring.cpp.

◆ removeChars() [1/5]

void Steinberg::String::removeChars ( CharGroup  mode = kSpace)

Removes all of group.

Definition at line 3174 of file fstring.cpp.

◆ removeChars() [2/5]

bool Steinberg::String::removeChars ( const char16 *  which)

Definition at line 409 of file fstring.h.

◆ removeChars() [3/5]

bool Steinberg::String::removeChars ( const char16  which)

Definition at line 411 of file fstring.h.

◆ removeChars() [4/5]

bool Steinberg::String::removeChars ( const char8 *  which)

Definition at line 408 of file fstring.h.

◆ removeChars() [5/5]

bool Steinberg::String::removeChars ( const char8  which)

Definition at line 410 of file fstring.h.

◆ removeChars16() [1/2]

bool Steinberg::String::removeChars16 ( const char16 *  which)

Remove all occurrences of each char in 'which'.

Definition at line 3272 of file fstring.cpp.

◆ removeChars16() [2/2]

bool Steinberg::String::removeChars16 ( const char16  which)

Definition at line 407 of file fstring.h.

◆ removeChars8() [1/2]

bool Steinberg::String::removeChars8 ( const char8 *  which)

Remove all occurrences of each char in 'which'.

Definition at line 3248 of file fstring.cpp.

◆ removeChars8() [2/2]

bool Steinberg::String::removeChars8 ( const char8  which)

Definition at line 406 of file fstring.h.

◆ removeSubString()

bool Steinberg::String::removeSubString ( const ConstString subString,
bool  allOccurences = true 
)

Definition at line 3061 of file fstring.cpp.

◆ replace() [1/5]

int32 Steinberg::String::replace ( const char16 *  toReplace,
const char16 *  toReplaceWith,
bool  all = false,
CompareMode  m = kCaseSensitive 
)

Replace find string with replace string - returns number of replacements.

Definition at line 2923 of file fstring.cpp.

◆ replace() [2/5]

int32 Steinberg::String::replace ( const char8 *  toReplace,
const char8 *  toReplaceWith,
bool  all = false,
CompareMode  m = kCaseSensitive 
)

Replace find string with replace string - returns number of replacements.

Definition at line 2895 of file fstring.cpp.

◆ replace() [3/5]

String & Steinberg::String::replace ( uint32  idx,
int32  n1,
const char16 *  str,
int32  n2 = -1 
)

Replace n1 characters of this (starting at idx) with n2 characters of str (n1,n2=-1: until end)

Definition at line 2858 of file fstring.cpp.

◆ replace() [4/5]

String & Steinberg::String::replace ( uint32  idx,
int32  n1,
const char8 *  str,
int32  n2 = -1 
)

Replace n1 characters of this (starting at idx) with n2 characters of str (n1,n2=-1: until end)

Definition at line 2817 of file fstring.cpp.

◆ replace() [5/5]

String & Steinberg::String::replace ( uint32  idx,
int32  n1,
const ConstString str,
int32  n2 = -1 
)

Replace n1 characters of this (starting at idx) with n2 characters of str (n1,n2=-1: until end)

Definition at line 2807 of file fstring.cpp.

◆ replaceChars() [1/4]

bool Steinberg::String::replaceChars ( char16  toReplace,
char16  toReplaceBy 
)

Definition at line 394 of file fstring.h.

◆ replaceChars() [2/4]

bool Steinberg::String::replaceChars ( char8  toReplace,
char8  toReplaceBy 
)

Definition at line 393 of file fstring.h.

◆ replaceChars() [3/4]

bool Steinberg::String::replaceChars ( const char16 *  toReplace,
char16  toReplaceBy 
)

Definition at line 396 of file fstring.h.

◆ replaceChars() [4/4]

bool Steinberg::String::replaceChars ( const char8 *  toReplace,
char8  toReplaceBy 
)

Definition at line 395 of file fstring.h.

◆ replaceChars16() [1/2]

bool Steinberg::String::replaceChars16 ( char16  toReplace,
char16  toReplaceBy 
)

Definition at line 392 of file fstring.h.

◆ replaceChars16() [2/2]

bool Steinberg::String::replaceChars16 ( const char16 *  toReplace,
char16  toReplaceBy 
)

Definition at line 3001 of file fstring.cpp.

◆ replaceChars8() [1/2]

bool Steinberg::String::replaceChars8 ( char8  toReplace,
char8  toReplaceBy 
)

Definition at line 391 of file fstring.h.

◆ replaceChars8() [2/2]

bool Steinberg::String::replaceChars8 ( const char8 *  toReplace,
char8  toReplaceBy 
)

Returns true when any replacement was done.

Definition at line 2974 of file fstring.cpp.

◆ resize()

bool Steinberg::String::resize ( uint32  newSize,
bool  wide,
bool  fill = false 
)
protected

Definition at line 2320 of file fstring.cpp.

◆ setChar() [1/2]

bool Steinberg::String::setChar ( uint32  index,
char16  c 
)

Definition at line 342 of file fstring.h.

◆ setChar() [2/2]

bool Steinberg::String::setChar ( uint32  index,
char8  c 
)

Definition at line 341 of file fstring.h.

◆ setChar16()

bool Steinberg::String::setChar16 ( uint32  index,
char16  c 
)

Definition at line 2440 of file fstring.cpp.

◆ setChar8()

bool Steinberg::String::setChar8 ( uint32  index,
char8  c 
)

Definition at line 2390 of file fstring.cpp.

◆ swapContent()

void Steinberg::String::swapContent ( String s)

Swaps ownership of the strings pointed to.

Definition at line 3606 of file fstring.cpp.

◆ take() [1/2]

void Steinberg::String::take ( String str)

Take ownership of the string of 'str'.

Definition at line 3620 of file fstring.cpp.

◆ take() [2/2]

void Steinberg::String::take ( void *  _buffer,
bool  wide 
)

Take ownership of buffer.

Definition at line 3631 of file fstring.cpp.

◆ text16()

const char16 * Steinberg::String::text16 ( ) const
virtual

Returns pointer to string of type char16.

Reimplemented from Steinberg::ConstString.

Definition at line 649 of file fstring.h.

◆ text8()

const char8 * Steinberg::String::text8 ( ) const
virtual

Returns pointer to string of type char8.

Reimplemented from Steinberg::ConstString.

Definition at line 640 of file fstring.h.

◆ toAttributes()

bool Steinberg::String::toAttributes ( IAttributes a,
IAttrID  attrID 
)

Definition at line 3595 of file fstring.cpp.

◆ toLower() [1/2]

void Steinberg::String::toLower ( )

Lower case the string.

Definition at line 3468 of file fstring.cpp.

◆ toLower() [2/2]

void Steinberg::String::toLower ( uint32  index)

Lower case the character.

Definition at line 3456 of file fstring.cpp.

◆ toMultiByte()

bool Steinberg::String::toMultiByte ( uint32  destCodePage = kCP_Default)

Definition at line 2216 of file fstring.cpp.

◆ toPascalString()

unsigned char * Steinberg::String::toPascalString ( unsigned char buf)

Pascal string conversion.

Definition at line 3677 of file fstring.cpp.

◆ toUpper() [1/2]

void Steinberg::String::toUpper ( )

Upper case the string.

Definition at line 3513 of file fstring.cpp.

◆ toUpper() [2/2]

void Steinberg::String::toUpper ( uint32  index)

Upper case the character.

Definition at line 3501 of file fstring.cpp.

◆ toVariant()

void Steinberg::String::toVariant ( FVariant var) const

Definition at line 3573 of file fstring.cpp.

◆ toWideString()

bool Steinberg::String::toWideString ( uint32  sourceCodePage = kCP_Default)

Converts to wide string according to sourceCodePage.

Definition at line 2121 of file fstring.cpp.

◆ trim()

bool Steinberg::String::trim ( String::CharGroup  group = kSpace)

Trim lead/trail.

Definition at line 3111 of file fstring.cpp.

◆ updateLength()

void Steinberg::String::updateLength ( )

Call this when the string is truncated outside (not recommended though)

Definition at line 2112 of file fstring.cpp.

◆ vprintf() [1/2]

String & Steinberg::String::vprintf ( const char16 *  format,
va_list  args 
)

Definition at line 3330 of file fstring.cpp.

◆ vprintf() [2/2]

String & Steinberg::String::vprintf ( const char8 *  format,
va_list  args 
)

Definition at line 3321 of file fstring.cpp.


The documentation for this class was generated from the following files: