Horje
js replace space with underscore Code Example
js replace space with underscore
var string = "my name";
string = string.replace(/ /g,"_"); //returns my_name
javascript replace space by underscore
// replaces space with '_'
str = str.replace(/ /g, "_");
// or
str = str.split(' ').join('_');
javascript replace all spaces
var str = 'a b c';
var replaced = str.split(' ').join('_');
replace space with underscore in c#
using System;
class Demo {
   static void Main() {
      String str, str2;
      str ="Hello World !";
      Console.WriteLine("String: "+str);
      str2 = str.Replace(" ", "-");
      Console.WriteLine("String (After replacing): "+str2);
   }
}




Javascript

Related
list all node processes Code Example list all node processes Code Example
node sleep Code Example node sleep Code Example
rebuild node sass Code Example rebuild node sass Code Example
html print year Code Example html print year Code Example
ts ignore in jsx Code Example ts ignore in jsx Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8