strPrompt Function

Produces a string longer than the length of the input string appended with periods that are followed by a colon and a space.


str strPrompt(str _string, _int len)

Parameter

Description

_string

The original string.

_len

The final length of the string.

A string that always begins with the input _string parameter value and appended with periods that are followed by a colon and a space. The total length matches the _len parameter value.

NoteNote

In atypical cases where the _len value is only slightly larger than the _string length, top precedence is given to adding the trailing space. The next precedence is given to the colon. The lowest precedence is given to the periods. Negative _len values return the input string appended with a trailing space.


static void JobStrPromptDemo(Args _args)
{
    // Printed string is "[abc..: ]"
    print "[", strPrompt("abc", 7), "]";
    pause;
}

Community Additions

ADD
Show: