inline string patching from lib/ext/string.rb

Change-Id: Ifb811afa3e5ebd01f1faa66f280020e6fbc9088a
Reviewed-on: https://gerrit.instructure.com/30011
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
QA-Review: Stephan Hagemann <stephan@pivotallabs.com>