Files
highground-fork/string/docs/find/find.md

508 B

string_Find

Look for the first occurence of needle in haystack and return its index in the string. If it isn't found, return -1.

Arguments

  • haystack (string): the string to search.
  • needle (string): the substring to look for.

Returns

index (int): the index of the first occurence of needle in haystack. If it isn't found, return -1.

Example

Ground

call !string_Find "abcdefg" "d" &index
println $index # 3

Solstice

puts string_Find("abcdefg", "d") // 3