strmid

Copy a subsection of a string

Description

strmid( dest[], const source[], start=0, end=cellmax, maxlength=sizeof dest )

Copy a subset of characters from source into dest.

Parameters

dest The buffer for the result
source The string that we will extract data from
start The location in source where we start extracting data from
end The location in source where we will stop copying.
maxlenght (optional) The size in cells of the dest buffer

Return value

The number of characters copied into dest.

Example usage

    new s{20};
    new b{20} = "CatDogAnt";
 
    strmid(s, b, 3, 6);  // returns 3
 
    // s now contains "Dog"