1Strings.firstOccurs(3kaya)   Kaya module reference  Strings.firstOccurs(3kaya)
2
3
4

NAME

6       Strings::firstOccurs  - Return the position of the first occurence of a
7       substring
8

SYNOPSIS

10       Int firstOccurs( String needle, String haystack )
11

ARGUMENTS

13       needle The string to check for
14
15       haystack The string to check
16

DESCRIPTION

18       Returns the position of the first occurence of the needle substring  in
19       the  haystack  string  (or the length of the string if the substring is
20       not in the string).
21
22
23    str = "abcdefgabcde";
24    i = firstOccurs("ab",str); // i = 0
25    i = firstOccurs("de",str); // i = 3
26    i = firstOccurs("efa",str); // i = 12
27

AUTHORS

29       Kaya  standard  library  by  Edwin  Brady,  Chris  Morris  and   others
30       (kaya@kayalang.org). For further information see http://kayalang.org/
31

LICENSE

33       The  Kaya  standard  library  is free software; you can redistribute it
34       and/or modify it under the terms  of  the  GNU  Lesser  General  Public
35       License  (version  2.1  or  any later version) as published by the Free
36       Software Foundation.
37
39       Strings.firstOccurs (3kaya)
40
41
42
43Kaya                             December 2010      Strings.firstOccurs(3kaya)
Impressum