Answer the question
In order to leave comments, you need to log in
Automatic string length adjusting function in C?
I am writing a C script in a similar language for one toy, there is such a thing as dialog boxes, the size of the dialog box depends on the description line in this window, and it turns out that the line is all the time of different lengths and, for example, "Enter password" has a length of about 250px and "Password doesn't meet the requirements..." is about 1000px long.
I need the length to be always approximately the same, how is this implemented?
Googled Control characters, they write to "Line extension" to use \t, to transfer \n. I ask for help, I am weak in si.
Answer the question
In order to leave comments, you need to log in
And here Si?
1.you have a scripting C-like language - this is not at all like C
2.C does not draw windows and does not control them
3.How do you imagine adjusting the length of a line (abbreviate words, replace with shorter synonyms, add your own version)? Moreover, he does not do this. This is some kind of lexical analyzer. Do you need it?
Maybe you just decide on the approximate number of characters per line (which fits into the window size that is convenient for you) and will form lines of the required length yourself?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question