Sample code for 30+ languages & platforms
Unicode C

StringBuilder GetAfterBetween

Demonstrates the GetAfterBetween method.

Chilkat Unicode C Downloads

Unicode C
#include <C_CkStringBuilderW.h>

void ChilkatSample(void)
    {
    HCkStringBuilderW sb;
    const wchar_t *searchAfter;
    const wchar_t *companyName;

    sb = CkStringBuilderW_Create();
    CkStringBuilderW_Append(sb,L"<abc><person><name>Joe</name></person><company><name>Chilkat Software</name></company></abc>");

    //  The GetAfterBetween method gets the substring between two arbitrary marker strings, and doesn't
    //  start searching until the searchAfter string is passed.

    //  For example, to get the company name in the string above...
    searchAfter = L"<company>";
    companyName = CkStringBuilderW_getAfterBetween(sb,searchAfter,L"<name>",L"</name>");
    wprintf(L"Company Name = %s\n",companyName);


    CkStringBuilderW_Dispose(sb);

    }