Simplest method is to use Regex. 2012/10/16 ajay paswan <[email protected]>
> What is the most efficient way to drop '#' from the first place and last > place if any. > > for example: > if input= #hithere# then output = hithere > if input = hithere# then output =hithere > if input = #hithere then output =hithere > if input = hithere then output=hithere > > -- > Posted via http://www.ruby-forum.com/. > > -- You received this message because you are subscribed to the Google Groups ruby-talk-google group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at https://groups.google.com/d/forum/ruby-talk-google?hl=en
