Unclassified NewsBoard Code Reference

AbbcExpandSelection function

Looks around a 'selected' [tag](...[/tag]) for (spaces and) NEW-LINES and
expands the selection to include them.

function AbbcExpandSelection (&$text, &$startpos, &$endpos, $length = -1);

Parameters:

text
(string)
startpos  –  in/out
(int)
endpos  –  in/out
(int)
length  –  optional, default: -1
(int) [optional]

Return value:

(int) difference between old and new selection length

Remarks:

Expansion stops before first non-space && non-new-line char or after first
new-line-char. For performance, strlen($text) can be given in $length, but
that's optional.

Implementation file: unb_lib/abbc.lib.php, line 1298

© 2006 Yves Goergen. Unclassified NewsBoard Homepage. Reference based on UNB unb.devel.20060128, dated 2006-01-28.