Sun Java System Web Server 7.0 Update 6 NSAPI Developer's Guide

pblock_str2pblock() Function

The pblock_str2pblock function scans a string for parameter pairs, adds them to a pblock, and returns the number of parameters added.

Syntax

int pblock_str2pblock(char *str, pblock *pb);

Return Values

The number of parameter pairs added to the pblock, if any, or -1 if an error occurs.

Parameters

char *str is the string to be scanned.

The name-value pairs in the string can have the format name=value or name="value."

All backslashes (\) must be followed by a literal character. If string values are found with no unescaped = signs (no name=), the function assumes the names 1, 2, 3, and so on, depending on the string position. For example, if pblock_str2pblock finds "some strings together," the function treats the strings as if they appeared in name-value pairs as 1="some" 2="strings" 3="together."

pblock *pb is the pblock into which the name-value pairs are stored.

See Also

pblock_copy() Function, pblock_create() Function, pblock_find() Function, pblock_free() Function, pblock_nvinsert() Function, pblock_remove() Function, pblock_pblock2str() Function