company logo

String :: chop - Remove count characters from the end

The function removes iCount characters from the end of the String object.

If iCount is greater than lengthInUnits(), the string area will be cleared and the result is an empty String object.

When iCount is less or equal zero, the function throws an exception.

If you want to remove characters from the beginning of the string, use erase() with position zero instead.

odaba::String("Mosambique").chop(3) == "Mosambi";

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

Implementation details

odaba::String & String  :: chop ( int32 iCount )
  • iCount - Number of items

    The value contains the number of items to be processed or stored in a collection.