<?xml version="1.0" encoding="UTF-8"?>
	<rss version="2.0"
		xmlns:content="http://purl.org/rss/1.0/modules/content/"
		xmlns:wfw="http://wellformedweb.org/CommentAPI/"
		xmlns:dc="http://purl.org/dc/elements/1.1/"
		xmlns:atom="http://www.w3.org/2005/Atom"

			>

	<channel>
		<title>Cycling 74  &#187;  Topic: Need help with Regex, string.length</title>
		<atom:link href="http://cycling74.com/forums/topic/need-help-with-regex-string-length/feed" rel="self" type="application/rss+xml" />
		<link>http://cycling74.com/forums/topic/need-help-with-regex-string-length/feed</link>
		<description></description>
		<pubDate>Thu, 20 Jun 2013 01:44:40 +0000</pubDate>
		<generator>http://bbpress.org/?v=2.2.4</generator>
		<language></language>

		
														
					
				<item>
					<guid>http://cycling74.com/forums/topic/need-help-with-regex-string-length/#post-62721</guid>
					<title><![CDATA[Need help with Regex, string.length]]></title>
					<link>http://cycling74.com/forums/topic/need-help-with-regex-string-length/#post-62721</link>
					<pubDate>Mon, 02 Apr 2012 01:40:03 +0000</pubDate>
					<dc:creator>Lume</dc:creator>

					<description>
						<![CDATA[
						<p>I&#8217;m at my wit&#8217;s end, so any help would be greatly appreciated!<br />
I want to find trailing whitespace at the end of a string,<br />
then adjust the string&#8217;s length accordlingly.<br />
This is what I have so far:</p>
<p><code>space = /''$/g;<br />
kitstring = kitstring.replace(/''$/g, null);</code></p>
<p>for (i = 9; i > 0; i--)<br />
{<br />
	if (kitstring[i] == space)<br />
	{<br />
		kitstring.length = kitstring.length--;<br />
	}<br />
}<br /></p>
<p>I&#8217;ve tried many things, and looked around in the forum.<br />
Am I doing something wrong with regex or kitstring.length?<br />
No matter what I do the string length always appears as &#8220;10&#8243; in the max window.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/need-help-with-regex-string-length/#post-226494</guid>
					<title><![CDATA[Re: Need help with Regex, string.length]]></title>
					<link>http://cycling74.com/forums/topic/need-help-with-regex-string-length/#post-226494</link>
					<pubDate>Mon, 02 Apr 2012 02:19:44 +0000</pubDate>
					<dc:creator>dhjdhjdhj</dc:creator>

					<description>
						<![CDATA[
						<p>I don&#8217;t know if max&#8217;s implementation of strings in JavaScript has the trim operator. But lots of different answers to your question here</p>
<p><a href="http://stackoverflow.com/questions/498970/how-do-i-trim-a-string-in-javascript" rel="nofollow">http://stackoverflow.com/questions/498970/how-do-i-trim-a-string-in-javascript</a></p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/need-help-with-regex-string-length/#post-226495</guid>
					<title><![CDATA[Re: Need help with Regex, string.length]]></title>
					<link>http://cycling74.com/forums/topic/need-help-with-regex-string-length/#post-226495</link>
					<pubDate>Mon, 02 Apr 2012 06:53:09 +0000</pubDate>
					<dc:creator>Lume</dc:creator>

					<description>
						<![CDATA[
						<p>Yep, seen that.<br />
It&#8217;s just real tricky, because i post the string to the Max window as well. I test &#8220;X      &#8220;, but it appears as &#8220;X&#8221;, which is well and good, but the length of the string is still 10. I&#8217;m pretty sure this prevents the strings concatenating properly. </p>
<p>If the string is say &#8220;Rebellion2&#8243;, then it concats properly with &#8220;.syx&#8221;, then the file writes correctly in windows.</p>
<p>Thanks though, dhjdhjdhj, I&#8217;ll take a closer look at that link.</p>
						]]>
					</description>

					
					
				</item>

			
				<item>
					<guid>http://cycling74.com/forums/topic/need-help-with-regex-string-length/#post-226496</guid>
					<title><![CDATA[Re: Need help with Regex, string.length]]></title>
					<link>http://cycling74.com/forums/topic/need-help-with-regex-string-length/#post-226496</link>
					<pubDate>Thu, 05 Apr 2012 12:34:24 +0000</pubDate>
					<dc:creator>Lume</dc:creator>

					<description>
						<![CDATA[
						<pre><code>for (i = 10; i < 20 &#038;&#038; kit[i] != ""; i++, k++)<br />
	{<br />
		kitchar[k] = String.fromCharCode(kit[i]);<br />
	}<br /></code></pre><p>In the spirit of &#8220;the OP should post the solution when/if found&#8221;, the problem area of my code was in another function which i considered to be out of the scope of the problem.<br />
Of course, looking back now, I probably should&#8217;ve posted more code and the fact that I was trying to translate a sysex string. Lesson learned. </p>
<p>&#8230; &#038;&#038; kit[i] != &#8220;&#8221;;</p>
<p>In other words, keep copying the array over until a Null character is reacher. This is hard to determine at first glance, unless you know the difference between the ascii codes for Space and Null. Looking at the Max window I had no idea what the hell was going on. </p>
<p>Anyway, I&#8217;m talking to myself. Good day.</p>
						]]>
					</description>

					
					
				</item>

					
		
	</channel>
	</rss>

