afc_string_new

Name

afc_string_new  -- Allocates a string numchars long

Synopsis

char * afc_string_new ( unsigned long numchars );

Description

This command allocates a standard Amiga string. This string structure has been mutuated from AmigaE's afc_string_news, so from now on we will call them AFC string_news. These kind of strings have several advantages such as:

Bound checking

you'll not generate any Enforcer's hits by doing a afc_string_copy() with a string signed longer than the one allocated.

Faster afc_string_len

the afc_string_len() command is light years faster than the standard strlen.

Inputs

numchars

Number of chars to assign to the string.

Result

Note

See Also