Ok following problem...Long piece of text, in excess of 1000 chars, that has to be posted to a channel/nick.
Hence I cant post more then...400whatnot chars in one post I have to cut this long piece appart.
By the way the text comes from a mysql DB.
Can someone give me a nudge into the right direction as to how I take a string...and...lets say find out if there is a blankspace between char 380 and 400 and cut the string there and post it...take the rest of the string and do the same till stringlength is below 380 chars ?
No it actually doesnt...I have text that do not contain a \n for like pages.
see it as a variable containing a couple of hundred of chars that comes back from the mysqlDB
So how would I go about it to split it a blankspace beteern char 380 and 400 ?
demond wrote:since sending text to an IRC user always breaks on line breaks, you'll probably need to split your text using the newline character as separator:
go thou string starting from char. 380 till you find first blankspace
take everything from 0 ->number of the blackspace and post it
then continue to then next +380chars and do the same
till the rest of the string is smaller then 380 of course.