Admin Production ni-theme
Current Publication

AddStringPrefix

LabWindows/CVI

AddStringPrefix

int AddStringPrefix (char **string, const char stringPrefix[], int lengthOfPrefix);

Purpose

Inserts characters at the beginning of a string that you dynamically allocate previously.

This function reallocates the string so that it is large enough to contain the additional characters.

Parameters

Input
Name Type Description
stringPrefix const char[] Pass the null–terminated string that contains the characters you want to insert at the beginning of the other string.
lengthOfPrefix int Pass the maximum number of characters to insert at the beginning of the string.

Pass –1 to add all characters.
Output
Name Type Description
string char * Pass the address of the pointer to the string into which you want to insert additional characters.

The function reallocates the string so that it is large enough to contain the additional characters.

Return Value

Name Type Description
status int Returns FALSE if the function cannot reallocate the string because of insufficient memory.

Returns TRUE otherwise.

Additional Information

Library: Programmer's Toolbox

Include file: toolbox\toolbox.h

LabWindows/CVI compatibility: LabWindows/CVI 6.0 and later