Method String.Buffer()->_search()

class String.Buffer

Method _search

int(-1..) search(String.Buffer from, int character, int|void start, int|void end)

Description

Search for a character in the buffer, starting the scan from start and ending at end (inclusive).

Returns

Returns the position in the buffer where the character was found on success, and -1 on failure.

Note

Unlike the string variant of this function (which returns UNDEFINED on failure), this variant returns -1.

See also

Stdio.Buffer()->_search(), search(), lfun::_search()


Method _search

int(0..) search(String.Buffer from, string substring, int|void start, int|void end)

Description

Search for a substring in the buffer, starting the scan from start and ending at end (inclusive).

Returns

Returns the position in the buffer where the substring was found on success, and UNDEFINED on failure.

See also

Stdio.Buffer()->_search(), search(), lfun::_search()