Ruby · String · index. Index and last index a pattern text = "hello world" pattern = /l/ first = text.index(pattern) # 2: first match starts at char 2 n ...
確定! 回上一頁