<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://www.vgkb.de/w/index.php?action=history&amp;feed=atom&amp;title=Rust_Cookbook</id>
	<title>Rust Cookbook - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://www.vgkb.de/w/index.php?action=history&amp;feed=atom&amp;title=Rust_Cookbook"/>
	<link rel="alternate" type="text/html" href="https://www.vgkb.de/w/index.php?title=Rust_Cookbook&amp;action=history"/>
	<updated>2026-04-20T05:02:01Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in VGKB</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.vgkb.de/w/index.php?title=Rust_Cookbook&amp;diff=256&amp;oldid=prev</id>
		<title>Viktor am 11. Dezember 2019 um 20:19 Uhr</title>
		<link rel="alternate" type="text/html" href="https://www.vgkb.de/w/index.php?title=Rust_Cookbook&amp;diff=256&amp;oldid=prev"/>
		<updated>2019-12-11T20:19:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Version vom 11. Dezember 2019, 20:19 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Zeile 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Im [[Rust]] sammle ich Codesnippets, die an der ein und anderen Stelle das Leben einfacher machen.&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Im &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#039;&amp;#039;&amp;#039;&lt;/ins&gt;[[Rust]] &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Cookbook&amp;#039;&amp;#039;&amp;#039; &lt;/ins&gt;sammle ich Codesnippets, die an der ein und anderen Stelle das Leben einfacher machen.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== I/O ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== I/O ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Viktor</name></author>
		
	</entry>
	<entry>
		<id>https://www.vgkb.de/w/index.php?title=Rust_Cookbook&amp;diff=74&amp;oldid=prev</id>
		<title>Viktor: Neu angelegt</title>
		<link rel="alternate" type="text/html" href="https://www.vgkb.de/w/index.php?title=Rust_Cookbook&amp;diff=74&amp;oldid=prev"/>
		<updated>2019-05-02T16:29:23Z</updated>

		<summary type="html">&lt;p&gt;Neu angelegt&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Im [[Rust]] sammle ich Codesnippets, die an der ein und anderen Stelle das Leben einfacher machen.&lt;br /&gt;
&lt;br /&gt;
== I/O ==&lt;br /&gt;
=== Readline ohne Zeilenvorschub ===&lt;br /&gt;
{{Blogartikel|https://blog.v-gar.de/2019/04/rust-zeilenvorschub-nach-eingabe-entfernen/}}&lt;br /&gt;
Hier gibt es mehrere Wege der Umsetzung.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Mit .pop():&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Rust&amp;quot;&amp;gt;&lt;br /&gt;
use std::io::{Write, stdin, stdout};&lt;br /&gt;
&lt;br /&gt;
fn main() {&lt;br /&gt;
    // Intro&lt;br /&gt;
    println!(&amp;quot;-- INPUT Demo --&amp;quot;);&lt;br /&gt;
    print!(&amp;quot;Please enter something: &amp;quot;);&lt;br /&gt;
    stdout().flush().unwrap();&lt;br /&gt;
&lt;br /&gt;
    // Input&lt;br /&gt;
    let mut inputvar: String = String::new();                                  &lt;br /&gt;
    stdin().read_line(&amp;amp;mut inputvar).expect(&amp;quot;Error while data input&amp;quot;);         &lt;br /&gt;
    inputvar.pop(); // remove trailing newline&lt;br /&gt;
&lt;br /&gt;
    // Output&lt;br /&gt;
    println!(&amp;quot;Eingabe: {}&amp;quot;, inputvar);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Bzw. dies als verbesserte cross-platform Version:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Rust&amp;quot;&amp;gt;&lt;br /&gt;
fn trim_newline(s: &amp;amp;mut String) {&lt;br /&gt;
    while s.ends_with(&amp;#039;\n&amp;#039;) || s.ends_with(&amp;#039;\r&amp;#039;) {&lt;br /&gt;
        s.pop();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Oder noch kürzer und mit trim:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;Rust&amp;quot;&amp;gt;&lt;br /&gt;
let len = input.trim_end_matches(&amp;amp;[&amp;#039;\r&amp;#039;, &amp;#039;\n&amp;#039;][..]).len();&lt;br /&gt;
input.truncate(len);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Kategorie:Rust]]&lt;/div&gt;</summary>
		<author><name>Viktor</name></author>
		
	</entry>
</feed>