URLify a given string ( Replace spaces is % 20 ) | C # implementation of above approach ; Instantiate the string ; Trim the given string ; Replace All space ( unicode is \\ s ) to % 20 ; Display the result
using System ; class GFG { public static void Main ( ) { String str = " Mr ▁ John ▁ Smith ▁ " ; str = str . Trim ( ) ; str = str . Replace ( " ▁ " , " % 20" ) ; Console . Write ( str ) ; } }