Source/NFX/MiscUtils.cs
/// <summary>
/// Performs escaping plus sign in URL into its hex value
/// </summary>
Performs escaping plus sign in URL into its hex value
Performs escaping plus sign in URL into its hex value
public static string EscapeURIStringWithPlus(this string uri)
    {
      const string PQ = "%2B";
      if (uri.IsNullOrWhiteSpace()) return string.Empty;
      var builder = new StringBuilder();
      for (int i=0; i< uri.Length; i++)
      {
        var c = uri[i];
        if (c == '+') builder.Append(PQ);
        else builder.Append(c);
      }
      return builder.ToString();
    }
public static string EscapeURIStringWithPlus ( this string uri ) { const string PQ = " " ; if ( uri . IsNullOrWhiteSpace ( ) ) return string . Empty ; var builder = new StringBuilder ( ) ; for ( int i = 0 ; i < uri . Length ; i ++ ) { var c = uri [ i ] ; if ( c == ' ' ) builder . Append ( PQ ) ; else builder . Append ( c ) ; } return builder . ToString ( ) ; }
Performs escaping plus sign in URL into its hex value
Performs escaping plus sign in URL into its hex value
string
this