JanetDocsPlaygroundI'm feeling luckyGitHub sign in

string/find



    cfunction

    (string/find patt str &opt start-index)

    Searches for the first instance of pattern patt in string str. 
    Returns the index of the first character in patt if found, 
    otherwise returns nil.


2 examplesSign in to add an example
Loading...
(string/find "a" "abcdefa" 1)
# not yet documented start ^ position
# => 6
pepePlayground
(string/find "needle" "hay hay hay needle hay") # => 12
sogaiuPlayground