CFMutableStringMBS methods

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

Back to CFMutableStringMBS class.

CFMutableStringMBS.AppendCFStringMBS(s as CFStringMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
Appends the given CFStringMBS.

CFMutableStringMBS.AppendString(s as String)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
Appends the given Xojo string.

CFMutableStringMBS.Capitalize

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
Changes the first character represented by a CFStringMBS object to uppercase (if it is a lowercase alphabetical character).

CFMutableStringMBS.Delete(pos as Integer,len as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
Deletes a range of characters in a mutable CFStringMBS object.

CFMutableStringMBS.Insert(index as Integer,s as CFStringMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
Inserts a string at a specified location in the character buffer of a mutable CFStringMBS object.

CFMutableStringMBS.LocalizedCapitalize(LocaleIdentifier as String)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 18.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Localized capitalize.

Locale identifier can be "de", "de_DE" or "German" style.
Raises RaiseUnsupportedOperationException if locale identifier is not known.

CFMutableStringMBS.LocalizedLowercase(LocaleIdentifier as String)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 18.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Localized lowercase.

Locale identifier can be "de", "de_DE" or "German" style.
Raises RaiseUnsupportedOperationException if locale identifier is not known.

CFMutableStringMBS.LocalizedUppercase(LocaleIdentifier as String)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 18.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Localized uppercase.
Example
dim m1 as new CFMutableStringMBS("i")
dim m2 as new CFMutableStringMBS("i")

m1.Uppercase
m2.LocalizedUppercase("Turkish")

MsgBox m1.Str+EndOfLine+m2.Str
// shows to variants of capital I

Locale identifier can be "de", "de_DE" or "German" style.
Raises RaiseUnsupportedOperationException if locale identifier is not known.

CFMutableStringMBS.Lowercase

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
Changes all uppercase alphabetical characters in a mutable CFStringMBS to lowercase.

CFMutableStringMBS.Normalize(NormalizationForm as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin 4.3 ✅ Yes ❌ No ❌ No ✅ Yes All
Normalizes the string into the specified form as described in Unicode Technical Report #15.
Example
const kCFStringNormalizationFormD  = 0 // Canonical Decomposition
const kCFStringNormalizationFormKD = 1 // Compatibility Decomposition
const kCFStringNormalizationFormC = 2 // Canonical Decomposition followed by Canonical Composition
const kCFStringNormalizationFormKC = 3 // Compatibility Decomposition followed by Canonical Composition

dim s as CFStringMBS
dim m as CFMutableStringMBS

s=NewCFStringMBS("Hello é")
m=s.Normalize(kCFStringNormalizationFormD)

MsgBox str(s.Len)+" "+str(m.len)

// decomposed the length is one more.

Requires Mac OS X 10.2 or newer.

CFMutableStringMBS.Pad(padstr as CFStringMBS,len as Integer,indexIntoPad as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
Enlarges the string represented by a CFStringMBS object, padding it with specified characters, or truncates the string.

The CFStringMBS.Pad function has two purposes. It either enlarges the character buffer of a mutable CFStringMBS object to a given length, padding the added length with a given character or characters, or it truncates the character buffer to a smaller size. The key parameter for this behavior is the length parameter; if it is greater than the current length of the represented string, padding takes place, and if it less than that length, truncation occurs.

For example, say you have a mutable CFStringMBS ( aMutStr ) containing the characters "abcdef". The call

CFStringMBS.Pad(newcfstring(". "), 12, 1)

results in aMutStr containing "abcdef . . .". However, the following call

CFStringMBS.Pad( nil, 3, 0)

results in aMutStr containing "abc".

CFMutableStringMBS.Replace(newstr as CFStringMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
Replaces the content of this CFMutableStringMBS with the one from newstr.

See also:

CFMutableStringMBS.Replace(pos as Integer,len as Integer,newstr as CFStringMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
Replaces the substring with the given range of this CFMutableStringMBS with the one from newstr.

See also:

CFMutableStringMBS.Trim

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
Trims whitespace from the beginning and end of the characters represented by a mutable CFStringMBS object.

See also:

CFMutableStringMBS.Trim(trimchar as CFStringMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
Trims a specified substring from the beginning and end of the character contents represented by a mutable CFStringMBS object.

See also:

CFMutableStringMBS.Truncate(len as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
If the string is longer than len, it is truncated to len.

CFMutableStringMBS.Uppercase

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreFoundation MBS MacCF Plugin ✅ Yes ❌ No ❌ No ✅ Yes All
Changes all lowercase alphabetical characters in a mutable CFStringMBS object to uppercase.

The items on this page are in the following plugins: MBS MacCF Plugin.


💬 Ask a question or report a problem