Rup_1
(Rupesh)
1
Hi,
Suppose i have a string like:-
“Charge Set-Up Charge”
“Proof Charge Prepro Proof per Color”
“Charge Set-Up Charge (1st Color)”
i want to delete “Charge” from above string
i.e from this string “Charge Set-Up Charge” then i have to delete “Charge” and the expected result should be: “Set-Up Charge”
- let the string is “Proof Charge Prepro Proof per Color” then i have to delete from Charge and the expected output is: “Prepro Proof per Color”
Hi, You can do the below
string1.Substring(string1.IndexOf(“Charge”)+2)
where string1 is your input string
1 Like
Rup_1
(Rupesh)
3
Hi,
Suppose i have a string like
Charge Set-Up Charge
Proof Charge Prepro Proof per Color
Charge Set-Up Charge (1st Color)
i want to delete data from Charge keyword i.e in first string if i remove Charge keyword then o/p should be “Set-Up Charge”
- from second string if i remove charge keyword then o/p should be “Prepro Proof per Color”
- from third string if i remove charge keyword then o/p should be “Set-Up Charge (1st Color)”
then hoe i do.
yes, the above will give you the same result only.
It will give you o/p whatever is after the first Charge
1 Like
Divyashreem
(Divyashree Muddagangaiah)
5
Use string1.remove(string1.IndexOf(“Charge”),6) this will remove your fist occurrence of charge, 6 or 7 will vary based on your index value.