Methods

posΒΆ

pos(haystack:Str, needle:Str)

Find substring in a string.
Source: stdlib.ngs:2302

haystack

The string to search in

needle

The string to find

Returns

Int or null

Example

pos("abc", "cd")     # null
pos("abcdef", "cd")  # 2