Convert strings just as the 'active_support/core_ext/string' library from ruby to C#