Part 3
Substring Length
Part_btwn() specifies two positions: positions after which the substring starts, and the last position of the substring:
Prt_btwn(afterPsn, lastPsn, whichString);
Using the two we can calculate the length of the resulting substring:
|substring| = lastPsn - afterPsn;
Example:
α = <7, 2, 4, 1, 3 >;
β = Prt_btwn (1, 4, α) = <2, 4, 1 >;
| β | = 4 - 1 = 3;
The length of the substring β is 3.
|