Provides services for working with strings.

Syntax

Result = SRP_String(Service, String, Param1, Param2, Param3)

Returns

The meaning of the return value depends on the service.

Parameters

ParameterDescription
ServiceThe action to apply to the given string. Required.
StringThe string upon which the service will operate. Required.
Param1 - Param3Service parameters. See specific service for details.

Remarks

The SRP_String method provides a variety of operations that can help a developer with specific operations that are often cumbersome to accomplish in BASIC+ directly. This method is expected to increase its menu of services over time.

Service

Much like the Utility function in OpenInsight, the SRP_String function provides multiple services which are identified in the Service parameter. The services are:

ServiceDescription
DetokenizeCodeConverts an array of BASIC+ tokens into a string of BASIC+ code that can be compiled.
GetHeightCalculates the height a word-wrapped string would need given a certain font and width limit.
GetWidthCalculates the width a string would need given a certain font.
TokenizeCodeParses a string containing BASIC+ into an array of discrete BASIC+ tokens.
TrimA more advanced trim operation for OI strings.

Click on the service names above to read more details.

  • No labels