<?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/19999" />

	<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>2015-06-09T03:04:42-04:00</updated>

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

		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-06-09T03:04:42-04:00</updated>

		<published>2015-06-09T03:04:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104230#p104230</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104230#p104230"/>
		<title type="html"><![CDATA[Remove character of a list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104230#p104230"><![CDATA[
Perfect! Thanks <strong class="text-strong">caesar</strong>  <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Tue Jun 09, 2015 3:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[caesar]]></name></author>
		<updated>2015-06-09T00:35:49-04:00</updated>

		<published>2015-06-09T00:35:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104228#p104228</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104228#p104228"/>
		<title type="html"><![CDATA[Remove character of a list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104228#p104228"><![CDATA[
A combination of <em class="text-italics"><a href="http://tcl.activestate.com/man/tcl8.6/TclCmd/lsearch.htm" class="postlink">lsearch</a></em> to find it's position and <em class="text-italics"><a href="http://tcl.activestate.com/man/tcl8.6/TclCmd/lreplace.htm" class="postlink">lremove</a></em> to remove the element in said position will do what you asked for.<div class="codebox"><p>Code: </p><pre><code>set pos [lsearch $cursong "Ã"]if {$pos != -1} {set cursong [lreplace $cursong $pos $pos]}</code></pre></div>But this will replace only the first match it will find, meaning if you got two Ã characters then only the first one will be replaced. To remove all the occurrences of this character you could use <em class="text-italics"><a href="http://tcl.activestate.com/man/tcl8.6/TclCmd/string.htm" class="postlink">string map</a></em> instead:<div class="codebox"><p>Code: </p><pre><code>set cursong [string map [list "Ã" ""] $cursong]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=187">caesar</a> — Tue Jun 09, 2015 12:35 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[juanamores]]></name></author>
		<updated>2015-06-09T00:02:37-04:00</updated>

		<published>2015-06-09T00:02:37-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=104227#p104227</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=104227#p104227"/>
		<title type="html"><![CDATA[Remove character of a list]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=104227#p104227"><![CDATA[
I would like the list that is stored in the <em class="text-italics">cursong</em> variable, if present the character "Ã" is removed.<br>But I do not want to replace the space or another character, simply remove it.<br>Example: if the <em class="text-italics">cursong</em> variable returns: We are the wÃorld<br>To return: We are the world<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=12499">juanamores</a> — Tue Jun 09, 2015 12:02 am</p><hr />
]]></content>
	</entry>
	</feed>
