Hi, Ive tried to remove graves accent from string
StringReplace, Contents, Contents,',, All
but its clearly not working ... whats the correct syntax ...
Thanks!
How To Remove Graves Accent From String
-
- Posts: 61
- Joined: 20 Nov 2020, 21:29
Re: How To Remove Graves Accent From String
I had no difficulty but do not recommend using deprecated commands.
Explained: StringReplace
Code: Select all
text = a'b'c'd
StringReplace, text, text, ',, All
SendInput {Text}%text%
Re: How To Remove Graves Accent From String
If you mean you want to remove the accents from accented characters, then you have to replace the characters themselves. One approach:
Code: Select all
MsgBox, % RemoveGrave("Remove the acccents from these letters: ÀàÈèÌìÒòÙù")
return
RemoveGrave(str) {
static chars := {"À":"A","à":"a","È":"E","è":"e","Ì":"I","ì":"i","Ò":"O","ò":"o","Ù":"U","ù":"u"}
for a, u in chars
str := StrReplace(str, a, u)
return str
}
Re: How To Remove Graves Accent From String
This function by lexikos could help, if you want to remove diacritics: viewtopic.php?f=6&t=8089#p47548