Sample code for 30+ languages & platforms
React Native

StringBuilder GetAfterBetween

Demonstrates the GetAfterBetween method.

Chilkat React Native Downloads

React Native
import { StringBuilder } from '@chilkat/react-native'

function chilkatExample() {
  const sb = new StringBuilder();
  sb.append('<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...
  const searchAfter = '<company>';
  const companyName = sb.getAfterBetween(searchAfter, '<name>', '</name>');
  console.log(`Company Name = ${companyName}`);
}