hb_ColorIndex()

Extract one color from a full Clipper colorspec string.

Syntax

hb_ColorIndex( <cColorSpec>, <nIndex> )

Arguments

<cColorSpec> is a Clipper color list

<nIndex> is the position of the color item to be extracted, the first position is the zero.

Returns

The selected color string, or if anything goes wrong, an empty string.

Description

Clipper has a color spec string, which has more than one color in it, separated with commas. This function is able to extract a given item from this list. You may use the manifest constants defined in color.ch to extract common Clipper colors.
Examples
      ? hb_ColorIndex( "W/N, N/W", CLR_ENHANCED ) // "N/W"
Tests
      see the regression test suit for comprehensive tests.
Status

Ready

Compliance

Was not part of CA-Clipper.

Files

Library is rtl

See Also