Contents page

Rules for Tools/stringtext()


stringtext()
SYNOPSIS
     char *stringtext(struct String *string)

ARGUMENTS
    `struct String *string'
          Dynamic string to convert.

DESCRIPTION
     `stringtext()' converts a Bars&Pipes dynamic string into a null
     terminated C string.

     Because `stringtext()' returns a pointer to a global string, you
     must transfer its contents immediately into your own buffer.
     Otherwise, the next time `stringtext()' is called (and that could
     be by another Task,) your text will change to reflect that
     conversion.

     The following uses `stringtext()' to print the name of a Clip:
            struct Clip  *clip;

  printf("%s is the name of this clip.\n",
        (*functions->stringtext)(clip->name));

SEE
     See allocstring(), freestring().