Sun Java System Web Server 6.1 SP7 NSAPI Programmer's Guide


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


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


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


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=), it 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, pblock_create, pblock_find, pblock_free, pblock_nvinsert, pblock_remove, pblock_pblock2str