Sample code for 30+ languages & platforms
Swift

StringBuilder GetBetween

Demonstrates the GetBetween method.

Chilkat Swift Downloads

Swift

func chilkatTest() {
    let sb = CkoStringBuilder()!
    sb.append(value: "<company><name>Chilkat Software</name></company>")

    // For example, to get the company name in the string above...
    var companyName: String? = sb.getBetween(beginMark: "<name>", endMark: "</name>")
    print("Company Name = \(companyName!)")

}