company logo

String :: extract - Get string between begin end end tag

The function returns the string value between two strings.

Return value:  String value ( odaba::String & )

Implementation overview

Implementation details

  1. Get string between begin end end tag
    odaba::String String  :: extract ( odaba::String &sBegin, odaba::String &sEnd )

    The function searches the string from beginning

    • sBegin - Starting or begin string
    • sEnd - Terminating or end strint
  2. to list
  3. Extract nested strings
    odaba::String String  :: extract ( int32 iPosition, odaba::String &sBegin, odaba::String &sEnd, odaba::String &sStringSep )

    In order to extract strings from nested text strings, string delimiters sBegin and sEnd are considered as single characters defining the begin and the end of a text block (e.g. '{' and '}'). The string separator (e.g. '"') passed in sStringSep is also considered as single character. String delimiters within strings between string separators will be ignored. Searching starts at iPosition.

    • iPosition - Position in collection

      The position of an element in a collection is beginning with 0 for the first element.

    • sBegin - Starting or begin string
    • sEnd - Terminating or end strint
    • sStringSep - - internal feature
  4. to list
  5. Get string between begin end end tag starting at position
    odaba::String String  :: extract ( int32 iPosition, odaba::String &sBegin, odaba::String &sEnd )

    The function starts searching at position passed in iPosition. When iPosition is less than 0, the function throws an exception.

    • iPosition - Position in collection

      The position of an element in a collection is beginning with 0 for the first element.

    • sBegin - Starting or begin string
    • sEnd - Terminating or end strint
  6. to list