Feature #6444

alias for String#index

Added by bot pena over 3 years ago. Updated almost 3 years ago.

[ruby-core:45105]
Status:Feedback
Priority:Normal
Assignee:-

Description

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

possible names:

String#find
String#search
String#pos

Associated revisions

Revision 11263
Added by Akinori MUSHA almost 9 years ago

  • lib/set.rb (Set#): Fix XOR operation against a container that holds duplicate values. [issue: #6444]

Revision 11263
Added by Akinori MUSHA almost 9 years ago

  • lib/set.rb (Set#): Fix XOR operation against a container that holds duplicate values. [issue: #6444]

History

#1 Updated by Yui NARUSE over 3 years ago

  • Status changed from Open to Feedback

Why do you want?

#2 Updated by Robert A. Heiler over 3 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.

#3 Updated by Yutaka HARA almost 3 years ago

  • Target version changed from 2.0.0 to next minor

Also available in: Atom PDF