Project

General

Profile

Actions

Feature #6444

closed

alias for String#index

Added by botp (bot pena) almost 12 years ago. Updated about 6 years ago.

Status:
Feedback
Assignee:
-
Target version:
-
[ruby-core:45105]

Description

would be nice if there is an alias for String#index

possible names:

String#find
String#search
String#pos

Updated by naruse (Yui NARUSE) almost 12 years ago

  • Status changed from Open to Feedback

Why do you want?

Updated by shevegen (Robert A. Heiler) almost 12 years ago

#find already exists in Enumerable. I don't think it is a good choice.
#pos is not really a proper english word. You probably meant #position.

You can however always extend class String on your own and add these methods.

Updated by yhara (Yutaka HARA) over 11 years ago

  • Target version changed from 2.0.0 to 2.6
Actions #4

Updated by naruse (Yui NARUSE) about 6 years ago

  • Target version deleted (2.6)
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0