Search the first occurence of pattern.

Return null if not found.

assert "I say hello to the world!".search("hello").from  == 6
assert "I say goodbye to the world!".search("hello")     == null

Property definitions

core :: string_search $ Text :: search
	# Search the first occurence of `pattern`.
	# Return null if not found.
	#
	#     assert "I say hello to the world!".search("hello").from  == 6
	#     assert "I say goodbye to the world!".search("hello")     == null
	fun search(pattern: Pattern): nullable Match do return pattern.search_in(self, 0)
lib/core/text/string_search.nit:356,2--361,82