Project

General

Profile

Actions

Feature #6444

open

alias for String#index

Added by botp (bot pena) almost 9 years ago. Updated over 3 years ago.

Status:
Feedback
Priority:
Normal
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 9 years ago

  • Status changed from Open to Feedback

Why do you want?

Updated by shevegen (Robert A. Heiler) almost 9 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 8 years ago

  • Target version changed from 2.0.0 to 2.6
Actions #4

Updated by naruse (Yui NARUSE) over 3 years ago

  • Target version deleted (2.6)
Actions

Also available in: Atom PDF