Hello Team,
in my project, Trim() not working what could be reason
Hello Team,
in my project, Trim() not working what could be reason
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Naimish MakwanaRank #324 · 7.7K reputationPosted Jan 25, 2023, 4:31 AM EST
Can you please give some brief or code example? It will help to understand your issue.
Rajeesh MenothRank #118 · 18.4K reputationPosted Jan 25, 2023, 7:52 AM EST
Hi,
Better to give a detailed explanation because we don't know what is happening in your project.
Jignesh KumarRank #91 · 22.9K reputationPosted Jan 25, 2023, 6:53 AM EST
string str = " This is my string "; var trimStartAndEndBoth = str.Trim(); var trimAtStart = str.TrimStart(); var trimAtEnd = str.TrimEnd();Hello Loki,
You can try below one ,
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Jan 26, 2023, 12:53 PM EST
You can use Replace if you're triming empty spaces
Sam HobbsRank #107 · 20.5K reputationPosted Jan 26, 2023, 1:23 PM EST
Use a hexadecimal viewer to look at the data and copy and pste that here or at least a screen capture. Also show the relevant source code.