Quote:
Originally Posted by Dragokas
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 (...)
__________________