javascript replace i into I
Posted
by Eric Sim
on Stack Overflow
See other posts from Stack Overflow
or by Eric Sim
Published on 2010-05-02T07:08:25Z
Indexed on
2010/05/02
7:17 UTC
Read the original article
Hit count: 230
JavaScript
|replace
I need a javascript to replace i into I. This should apply to cases such as
- i'm good.
- So am i.
- He though i love him.
The standard ThisContent = ThisContent.replace("i", "I");
doesn't work because it replaces every i. I also thought of ThisContent = ThisContent.replace(" i ", " I ");
but it doesn't work for the first and second case.
Any idea?
© Stack Overflow or respective owner