What does %.*s do?
#1

Hello People,
What does the %.*s do? Some told me to use it when i need to make a text that if it will be more than 80 words it will create a second line with the second half of what the person wrote....
But what does the %.*s do?
Thanks for helping and have a good day!
Reply
#2

I don't clearly understand what you are saying but visit the link below
https://sampwiki.blast.hk/wiki/Format

Hope it help you
Reply
#3

I randomly read this as I wanted to go to the 0.3.7 boards and thought "That would be the most awesome thing ever", but no, At least in C it's sort of an extra argument lenght limiter:

Quote:

It prints N number of characters from a target string :

printf("%.*s", 5, "=================");

will print =====

And following that reasoning it wold be the same as doing %.5s; it does not split anything and you need an extra function for that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)