<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - Convert TBuf8 to TUint - Comments</title>
 <link>http://www.newlc.com/topic-16878</link>
 <description>Comments for &quot;Convert TBuf8 to TUint&quot;</description>
 <language>en</language>
<item>
 <title>Re: Convert TBuf8 to TUint</title>
 <link>http://www.newlc.com/topic-16878#comment-36048</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;## Convert TBuf to TInt ##&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;TBuf8&amp;nbsp; &amp;nbsp; valTBuf;&lt;br /&gt;TInt&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;valInt;&lt;br /&gt;&lt;br /&gt;TLex valLex( valTBuf );&lt;br /&gt;valLex.Val( valInt );&lt;br /&gt;&lt;br /&gt;// than you will have the number that you have in the TBuf at the TInt&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;## Converte TInt to TBuf ##&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;TInt&amp;nbsp; &amp;nbsp; &amp;nbsp;valInt;&lt;br /&gt;TBuf8&amp;nbsp; valBuf;&lt;br /&gt;&lt;br /&gt;valInt = 123;&lt;br /&gt;&lt;br /&gt;valBuf.AppendNum( valInt );&lt;br /&gt;&lt;br /&gt;// than you will have the number that you have in the TInt at the TBuf&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;see ya&lt;br /&gt; &lt;img src=&quot;/sites/all/modules/smf_filter/smf_smileys/smiley.gif&quot; alt=&quot;Smiley&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;&lt;/div&gt;</description>
 <pubDate>Mon, 22 Jan 2007 12:51:45 +0100</pubDate>
 <dc:creator>Serginho</dc:creator>
 <guid isPermaLink="false">comment 36048 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Convert TBuf8 to TUint</title>
 <link>http://www.newlc.com/topic-16878#comment-36047</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Max,&lt;br /&gt;&lt;br /&gt;Num() converts integer to string, i.e. exactly the opposite of what the poster wanted...&lt;/div&gt;</description>
 <pubDate>Mon, 22 Jan 2007 02:30:41 +0100</pubDate>
 <dc:creator>sysctl-forum</dc:creator>
 <guid isPermaLink="false">comment 36047 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Convert TBuf8 to TUint</title>
 <link>http://www.newlc.com/topic-16878#comment-36046</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;Actually for situations like yours, you should be using Num.&lt;br /&gt;&lt;br /&gt;Please check: &lt;a href=&quot;http&amp;#58;//www.symbian.com/developer/techlib/v9.1docs/doc_source/reference/reference-cpp/N101CA/TDes8Class.html#%3a%3aTDes8%3a%3aNum%28%29&quot; target=&quot;_blank&quot;&gt;http://www.symbian.com/developer/techlib/v9.1docs/doc_source/reference/reference-cpp/N101CA/TDes8Class.html#%3a%3aTDes8%3a%3aNum%28%29&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Help descriptors!&lt;br /&gt;&lt;a href=&quot;http&amp;#58;//www.tanzim.co.uk/blog/2006/05/29/help-descriptors/&quot; target=&quot;_blank&quot;&gt;http://www.tanzim.co.uk/blog/2006/05/29/help-descriptors/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</description>
 <pubDate>Sun, 21 Jan 2007 20:56:55 +0100</pubDate>
 <dc:creator>maxxxpayne</dc:creator>
 <guid isPermaLink="false">comment 36046 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Convert TBuf8 to TUint</title>
 <link>http://www.newlc.com/topic-16878#comment-36045</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;has to be TLex (and its size vartients)&lt;/div&gt;</description>
 <pubDate>Thu, 18 Jan 2007 13:17:27 +0100</pubDate>
 <dc:creator>navaron</dc:creator>
 <guid isPermaLink="false">comment 36045 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Convert TBuf8 to TUint</title>
 <link>http://www.newlc.com/topic-16878#comment-36044</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;div class=&quot;quoteheader&quot;&gt;Quote from: bdekorte&lt;/div&gt;&lt;div class=&quot;quote&quot;&gt;TLex8...&lt;br /&gt;&lt;br /&gt;Can you give me an example?&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Try something like this:&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;codeheader&quot;&gt;Code:&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;TUint GetMyNumberL( const TDesC8&amp;amp; aStringAsNumber)&lt;br /&gt;{&lt;br /&gt;Â  Â  TLex8 lexer( aStringAsNumber);&lt;br /&gt;Â  Â  TUint value;&lt;br /&gt;Â  Â  User::LeaveIfError( lexer.Val( value, EDecimal));&lt;br /&gt;Â  Â  return value;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;void CheckMyImplementationL()&lt;br /&gt;{&lt;br /&gt;Â  Â  _LIT8( KAString, &amp;quot;1234abc&amp;quot;);&lt;br /&gt;Â  Â  TBuf8&amp;lt;42&amp;gt; buffer( KAString);&lt;br /&gt;Â  Â  const TUint result = GetMyNumberL( buffer);&lt;br /&gt;Â  Â  _LIT( KPanicCategory, &amp;quot;GetMyNumberL&amp;quot;);&lt;br /&gt;Â  Â  __ASSERT_ALWAYS( result == 1234, User::Panic( KPanicCategory, KErrGeneral));&lt;br /&gt;}&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Fri, 24 Nov 2006 22:39:17 +0100</pubDate>
 <dc:creator>Bo</dc:creator>
 <guid isPermaLink="false">comment 36044 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Convert TBuf8 to TUint</title>
 <link>http://www.newlc.com/topic-16878#comment-36043</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;TLex8...&lt;br /&gt;&lt;br /&gt;Can you give me an example?&lt;/div&gt;</description>
 <pubDate>Fri, 24 Nov 2006 22:24:47 +0100</pubDate>
 <dc:creator>bdekorte</dc:creator>
 <guid isPermaLink="false">comment 36043 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Convert TBuf8 to TUint</title>
 <link>http://www.newlc.com/topic-16878#comment-36042</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;div class=&quot;quoteheader&quot;&gt;Quote from: bdekorte&lt;/div&gt;&lt;div class=&quot;quote&quot;&gt;I have a TBuf8 item and want to convert it to an integer (TUint) so I can count with it.&lt;br /&gt;&lt;br /&gt;Any suggestions?&lt;br /&gt;&lt;/div&gt;Try TLex8.&lt;/div&gt;</description>
 <pubDate>Fri, 24 Nov 2006 22:11:51 +0100</pubDate>
 <dc:creator>Bo</dc:creator>
 <guid isPermaLink="false">comment 36042 at http://www.newlc.com</guid>
</item>
<item>
 <title>Convert TBuf8 to TUint</title>
 <link>http://www.newlc.com/topic-16878</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/topic-16878&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/topic-16878#comments</comments>
 <category domain="http://www.newlc.com/forums/symbian-c">Symbian C++</category>
 <pubDate>Fri, 24 Nov 2006 19:09:27 +0100</pubDate>
 <dc:creator>bdekorte</dc:creator>
 <guid isPermaLink="false">16457 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
