Created by: rht
Fixes https://github.com/stripe-contrib/pagerbot/issues/9
>> def strip_name(text, nick=nil) text.gsub(/\A(#{nick}:|@#{nick}) /, '') end
Test cases:
>> strip_name("pagerbot: make me a sandwich", "pagerbot")
=> "make me a sandwich"
>> strip_name("@pagerbot make me a sandwich", "pagerbot")
=> "make me a sandwich"
>> strip_name("pagerbot make me a sandwich", "pagerbot")
=> "pagerbot make me a sandwich"