@@ -1781,21 +1781,6 @@ func initSkipTable*(a: var SkipTable, sub: string) {.rtl,
1781
1781
# # Deprecated: Does nothing. Exists solely for backwards compatibility.
1782
1782
discard
1783
1783
1784
- # Forward declare
1785
- func find * (s, sub: string , start: Natural = 0 , last = 0 ): int {.rtl ,
1786
- extern : " nsuFindStr" , deprecated : " use strbasics.indexOf" , raises : [].}
1787
-
1788
- func find * (a: SkipTable , s, sub: string , start: Natural = 0 , last = 0 ): int {.
1789
- rtl , extern : " nsuFindStrA" , deprecated : " use strbasics.indexOf" .} =
1790
- # # Deprecated: use `strbasics.indexOf func<strbasics.html#indexOf,openArray[char],openArray[char]>`_.
1791
- # #
1792
- # # Shorthand for `find(s, sub, start, last)`. Makes no use of the `SkipTable`.
1793
- # #
1794
- # # See also:
1795
- # # * `find func<#find,string,string,Natural,int>`_
1796
- # # * `strbasics.indexOf func<strbasics.html#indexOf,openArray[char],openArray[char]>`_
1797
- return strutils.find (s, sub, start= start, last= last)
1798
-
1799
1784
func find * (s: string , sub: char , start: Natural = 0 , last = 0 ): int {.rtl ,
1800
1785
extern : " nsuFindChar" , deprecated : " use strbasics.indexOf" , raises : [].} =
1801
1786
# # Deprecated: use `strbasics.indexOf func<strbasics.html#indexOf,openArray[char],char>`_.
@@ -1886,6 +1871,17 @@ func find*(s, sub: string, start: Natural = 0, last = 0): int {.rtl,
1886
1871
else :
1887
1872
return start + index
1888
1873
1874
+ func find * (a: SkipTable , s, sub: string , start: Natural = 0 , last = 0 ): int {.
1875
+ rtl , extern : " nsuFindStrA" , deprecated : " use strbasics.indexOf" .} =
1876
+ # # Deprecated: use `strbasics.indexOf func<strbasics.html#indexOf,openArray[char],openArray[char]>`_.
1877
+ # #
1878
+ # # Shorthand for `find(s, sub, start, last)`. Makes no use of the `SkipTable`.
1879
+ # #
1880
+ # # See also:
1881
+ # # * `find func<#find,string,string,Natural,int>`_
1882
+ # # * `strbasics.indexOf func<strbasics.html#indexOf,openArray[char],openArray[char]>`_
1883
+ return strutils.find (s, sub, start= start, last= last)
1884
+
1889
1885
func rfind * (s: string , sub: char , start: Natural = 0 , last = - 1 ): int {.rtl ,
1890
1886
extern : " nsuRFindChar" .} =
1891
1887
# # Searches for `sub` in `s` inside range `start..last` (both ends included)
0 commit comments