1
Original text:
E02000000000000002DOCE LUAMAR MORENINHA 240G 00100309 00100309
I need to change for that:
E02000000000000002DOCE LUAMAR MORENINHA 240G 20100309 20100309
I’m wearing this:
if (str.Substring(0, 4) == "E020")
{
if (str.Substring(78, 2) == "00")
{
string str2 = str.Replace(str.Substring(78, 2), "20");
But the result is coming out like this:
E02202020202020202DOCE LUAMAR MORENINHA 240G 20120309 20120309
You’re putting 20 everywhere who has 00 on the line. Someone can help me?
Those number sets you want to change are always 08 numbers and start with 00?
– R.Santos
@jbueno Sorry for revert, but the position of the spaces is important and putting as quote, several spaces are rendered in HTML as one.
– Victor Stafusa