lib/string_search: make all introdiced method of Pattern protected
authorJean Privat <jean@pryen.org>
Tue, 25 Mar 2014 15:02:30 +0000 (11:02 -0400)
committerJean Privat <jean@pryen.org>
Tue, 25 Mar 2014 15:17:45 +0000 (11:17 -0400)
Because they are inherited by String and Char, they could confuse
the user that look at these classes the documentation.

Signed-off-by: Jean Privat <jean@pryen.org>

lib/standard/string_search.nit

index 6cd67c4..846de56 100644 (file)
@@ -45,10 +45,10 @@ interface Pattern
        # Search all `self` occurrences into `s`.
        #
        #     assert 'l'.search_all_in("hello world").length  == 3
-       #     assert 'z'.search_all_in("hello world"),length  == 0
+       #     assert 'z'.search_all_in("hello world").length  == 0
        #
        # Note: Is used by `String::search_all`.
-       fun search_all_in(s: String): Array[Match]
+       protected fun search_all_in(s: String): Array[Match]
        do
                var res = new Array[Match] # Result
                var match = search_in(s, 0)
@@ -68,7 +68,7 @@ interface Pattern
        #     assert 'z'.split_in("hello world").join("|")  == "hello world"
        #
        # Note: is used by `String::split`
-       fun split_in(s: String): Array[Match]
+       protected fun split_in(s: String): Array[Match]
        do
                var res = new Array[Match] # Result
                var i = 0 # Cursor