View Single Post
spumer
Senior Member
Join Date: Aug 2011
Old 02-23-2020 , 13:31   Re: [batch] Compress Russian strings (transliteration)
Reply With Quote #4

Quote:
Originally Posted by Dragokas View Post
Like, cut original nick "Nice Assistant" to "Nice Ass" ? DD
No. It depends.
Where you want to preserve original word completely without any cutting, it is a case.

There are lot of use cases. Upcoming examples:
- translation in panel: https://forums.alliedmods.net/showpo...5&postcount=22
- Name changer for bad names: https://github.com/Exle/Auto-Name-Changer
(I'm often fill new names for replacement that exceed the limit. Since I usually create > 20 options it is a lot of text to replace it manually)
- or even if you want to create nickname for yourself that contains russian letters that exceed maximum string size allowed in total.
Yes, cause you can't compress this nickname cause it have only english symbols.

I mean i actually don't see big problem in cutting, cause in 80% of cases buffer size is big enough.
I knew only one case where i needed smart cutting - vscripting. Buf size for vscript menus is 128 bytes.
For that cases i just wrote algorithm which cut long names and replace ending with dots (...)
__________________
spumer is offline