<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/8878" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2004-12-27T12:27:36-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/8878</id>

		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-12-27T12:27:36-04:00</updated>

		<published>2004-12-27T12:27:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44577#p44577</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44577#p44577"/>
		<title type="html"><![CDATA[Cut string in pieces]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44577#p44577"><![CDATA[
<blockquote class="uncited"><div>% set a bah<br>bah<br>% lappend a ohh<br>bah ohh<br>% append a hmmm<br>bah ohhhmmm<br>% lappend a crap<br>bah ohhhmmm crap<br>%</div></blockquote>well see what i mean maybe can be improved a bit by using lappend instead of append ..  don't need \x20 = which represents a space ..<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Mon Dec 27, 2004 12:27 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tebor]]></name></author>
		<updated>2004-12-26T16:19:09-04:00</updated>

		<published>2004-12-26T16:19:09-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44537#p44537</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44537#p44537"/>
		<title type="html"><![CDATA[Cut string in pieces]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44537#p44537"><![CDATA[
Woah so cool!<br><br>That is bloody briliant *grins*<br><br>Thank you that is going to be most valuable.<br><br><br><br><blockquote class="uncited"><div>you need to wrap words ? <br><br>this works wrote it while back maybe you get some ideas<br><br><a href="http://ftp.ofloo.net/pub/scripts/wrap.tcl.gz" class="postlink">http://ftp.ofloo.net/pub/scripts/wrap.tcl.gz</a><br><br>can be improved a bit by using lappend value $var instead of append value ${var}\x20<br><br>...</div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5434">tebor</a> — Sun Dec 26, 2004 4:19 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Ofloo]]></name></author>
		<updated>2004-12-26T13:56:11-04:00</updated>

		<published>2004-12-26T13:56:11-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44531#p44531</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44531#p44531"/>
		<title type="html"><![CDATA[Cut string in pieces]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44531#p44531"><![CDATA[
you need to wrap words ? <br><br>this works wrote it while back maybe you get some ideas<br><br><a href="http://ftp.ofloo.net/pub/scripts/wrap.tcl.gz" class="postlink">http://ftp.ofloo.net/pub/scripts/wrap.tcl.gz</a><br><br>can be improved a bit by using lappend value $var instead of append value ${var}\x20<br><br>...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3151">Ofloo</a> — Sun Dec 26, 2004 1:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2004-12-26T03:13:28-04:00</updated>

		<published>2004-12-26T03:13:28-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44515#p44515</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44515#p44515"/>
		<title type="html"><![CDATA[Cut string in pieces]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44515#p44515"><![CDATA[
dumping stuff that is not formatted (no line breaks) text to a person on IRC seems completely pointless to me but anyway:<div class="codebox"><p>Code: </p><pre><code>set n 380while {[string length $stuff]} {  set stuff [string replace $stuff 0 $n]  puthelp "notice $nick :[string range $stuff 0 $n]"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sun Dec 26, 2004 3:13 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tebor]]></name></author>
		<updated>2004-12-26T01:07:05-04:00</updated>

		<published>2004-12-26T01:07:05-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44512#p44512</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44512#p44512"/>
		<title type="html"><![CDATA[Re: Cut string in pieces]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44512#p44512"><![CDATA[
Maybe I can make it a bit clearer....<br><br>I am thinking along the lines of....<br><br>go thou string starting from char. 380 till you find first blankspace<br>take everything from 0 -&gt;number of the blackspace and post it<br>then continue to then next +380chars and do the same<br>till the rest of the string is smaller then 380 of course.<br><br>Does that make any sense?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5434">tebor</a> — Sun Dec 26, 2004 1:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tebor]]></name></author>
		<updated>2004-12-26T00:49:18-04:00</updated>

		<published>2004-12-26T00:49:18-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44511#p44511</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44511#p44511"/>
		<title type="html"><![CDATA[Cut string in pieces]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44511#p44511"><![CDATA[
No it actually doesnt...I have text that do not contain a \n for like pages.<br><br>see it as a variable containing a couple of hundred of chars that comes back from the mysqlDB<br><br>So how would I go about it to split it a blankspace beteern char 380 and 400 ?<br><br><blockquote class="uncited"><div>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:<div class="codebox"><p>Code: </p><pre><code>foreach line [split $yourtext \n] {  puthelp "notice $nick :$line"}</code></pre></div></div></blockquote><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5434">tebor</a> — Sun Dec 26, 2004 12:49 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2004-12-26T00:39:14-04:00</updated>

		<published>2004-12-26T00:39:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44510#p44510</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44510#p44510"/>
		<title type="html"><![CDATA[Cut string in pieces]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44510#p44510"><![CDATA[
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:<div class="codebox"><p>Code: </p><pre><code>foreach line [split $yourtext \n] {  puthelp "notice $nick :$line"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sun Dec 26, 2004 12:39 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[tebor]]></name></author>
		<updated>2004-12-26T00:29:52-04:00</updated>

		<published>2004-12-26T00:29:52-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=44509#p44509</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=44509#p44509"/>
		<title type="html"><![CDATA[Cut string in pieces]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=44509#p44509"><![CDATA[
Hi Community!<br><br>Ok following problem...Long piece of text, in excess of 1000 chars, that has to be posted to a channel/nick.<br>Hence I cant post more then...400whatnot chars in one post I have to cut this long piece appart.<br>By the way the text comes from a mysql DB.<br><br>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 ?<br><br>Sincerely and greatfull for your help<br>Tebor<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5434">tebor</a> — Sun Dec 26, 2004 12:29 am</p><hr />
]]></content>
	</entry>
	</feed>
