Objective-C
Objective-C
StringBuilder RemoveAfterFinal
Demonstrates the StringBuilder.RemoveAfterFinal method.The GetBefore method was added in Chilkat v9.5.0.77
Chilkat Objective-C Downloads
#import <CkoStringBuilder.h>
BOOL success = NO;
CkoStringBuilder *sb = [[CkoStringBuilder alloc] init];
success = [sb Append: @"abc::def::ghi"];
// Replace the 1st occurrence of a substring with another string.
BOOL bFound = [sb ReplaceFirst: @"::" replacement: @"-"];
NSLog(@"%@%d",@"bFound = ",bFound);
NSLog(@"%@%@",@"sb contains: ",[sb GetAsString]);
// Output is:
// bFound = True
// sb contains: abc-def::ghi