StringEnd Class Reference

#include <string.h>

Inheritance diagram for StringEnd:

Detailed Description

Class to store the position after the last character at the end of a string.

Here an example for GetPart. The first parameter of GetPart is the class StringPosition, the second StringCount.

res = str.GetPart(4, StringEnd()); // copy from position four on until the end of the string
res = str.GetPart(-4, StringEnd()); // copy from the position that is four characters from the end of the string until the end of the string
Definition: string.h:121
void * str
Definition: bytesobject.h:77
Py_UCS4 * res
Definition: unicodeobject.h:1113

Public Member Functions

 StringEnd ()
 StringEnd (Int value)
- Public Member Functions inherited from StringPosition
MAXON_IMPLICIT StringPosition (Int pos)
MAXON_ATTRIBUTE_FORCE_INLINE Int ResolvePosition (Int length) const

Additional Inherited Members

- Protected Attributes inherited from StringPosition
Int _value

Constructor & Destructor Documentation

◆ StringEnd() [1/2]

StringEnd ( )


◆ StringEnd() [2/2]

StringEnd ( Int  value)

Constructor for a position from the end. Other than the class StringPosition StringEnd allows you to refer to the position after the last character.

[in]valueThe (negative) position from the end or 0 for the string end (the position after the last character).