Anonymous user
Word wrap: Difference between revisions
m
→{{header|C}}
m (→{{header|TPP}}) |
m (→{{header|C}}) |
||
Line 216:
/* nonsensical hyphens to make greedy wrapping method look bad */
const char *string = "In olden times when wishing still helped one, there lived a king "
"whose daughters were all beautiful, but the youngest was so beautiful "
"that the sun itself, which has seen so much, was astonished whenever "
Line 241:
typedef struct word_t {
const char *s;
int len;
} *word;
word make_word_list(const char *s, int *n)
{
int max_n = 0;
Line 389:
return 0;
}</lang>
=={{header|D}}==
Basic algorithm. The text splitting is lazy.
|