Forum

> > CS2D > Scripts > Finding a String Size
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Finding a String Size

6 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Finding a String Size

Masea
Super User Off Offline

Zitieren
Hello,

You know there is a
string.len
which returns how many characters in the string.

I want something similar to that. That will return the size of the string in x position.

Like,
1
2
3
str = "Hey."

print(string.leng(str))
This will show me 4. But the thing is, the dot takes less space than other characters. Just example, let's say "." takes 1 pixel, "H" 4, "e" 3 and "y" 3. But I'll never have an idea what exactly space do they take.

How to get these?
1× editiert, zuletzt 10.12.17 17:51:42
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht