Hi,
rua17 schrieb:
I want to display in a list the name and the last name of my clients, but in some cases the string is to long, is there any function to truncate the strings?
You can simply write a Null-terminator at the desired cutoff position:
string[max_length] = chrNull;
It looks nice to cut off with an ellipsis ("..."):string[max_length - 1] = 0x85;
This will not work on multi-byte character codings of course (Japanese etc.).
Have fun, Alexander.
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
