MikeMCSD
asked on
Search a string then replace
In C#, I need to search the beginning of a string and replace it with an empty string:
The name is at the beginning, for example, the name: Ancient Secrets
Search string: Ancient Secrets Neti-Pot, Nasal Cleansing Pot
would be after: Neti-Pot, Nasal Cleansing Pot
I just want to remove the brand name at the beginning of the product name.
thanks
The name is at the beginning, for example, the name: Ancient Secrets
Search string: Ancient Secrets Neti-Pot, Nasal Cleansing Pot
would be after: Neti-Pot, Nasal Cleansing Pot
I just want to remove the brand name at the beginning of the product name.
thanks
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
do you know the brand names?or have a list of them
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
thanks everyone . .
this worked well:
p.Name.Substring(p.Manufac turer.Name .Length + 1)
this worked well:
p.Name.Substring(p.Manufac