<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Trim on SourFox</title>
    <link>https://sourfox.khmersite.net/tags/trim/</link>
    <description>Recent content in Trim on SourFox</description>
    <image>
      <title>SourFox</title>
      <url>https://sourfox.khmersite.net/papermod-cover.png</url>
      <link>https://sourfox.khmersite.net/papermod-cover.png</link>
    </image>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sun, 11 May 2025 14:56:56 +1000</lastBuildDate>
    <atom:link href="https://sourfox.khmersite.net/tags/trim/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Hi there!</title>
      <link>https://sourfox.khmersite.net/p/2025/05/hithere/</link>
      <pubDate>Sun, 11 May 2025 14:56:56 +1000</pubDate>
      <guid>https://sourfox.khmersite.net/p/2025/05/hithere/</guid>
      <description>&lt;p&gt;Hi there! Today, instead of writing another python program,  I had wrote a rust program. In this code, the goal was to ask for user&amp;rsquo;s name and then reply back.&lt;/p&gt;
&lt;p&gt;Requirements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ask for user name&lt;/li&gt;
&lt;li&gt;Replies back with &amp;lsquo;Hi, {name}, nice to meet you!&amp;rsquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The code:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;use std::io;

fn main() {
    println!(&amp;#34;What is your name?&amp;#34;);
    // Let&amp;#39;s variable &amp;#39;name&amp;#39; become mutable
    let mut name = String::new();
    match io::stdin().read_line(&amp;amp;mut name) {
        Ok(_) =&amp;gt; {
            //trims the string
            let trim1 = name.trim();
            println!(&amp;#34;Hi {}, nice to meet you.&amp;#34;, trim1);
        },
        Err(error) =&amp;gt; println!(&amp;#34;error: {error}&amp;#34;),
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That&amp;rsquo;s all! Hehehe. Bai bai.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
