• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Inserting a character

 
Kedar Dravid
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given a Javascript variable containing a String, what is the easiest way to insert a character at a specific position in the String?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34863
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kedar,
The easiest way I can think of is to create two substrings and then concatenate all the strings thogether:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic