<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>http://wiki.fhem.de/w/index.php?action=history&amp;feed=atom&amp;title=TRIM-Funktion-Anfangs%2FEndLeerzeichen_aus_Strings_entfernen</id>
	<title>TRIM-Funktion-Anfangs/EndLeerzeichen aus Strings entfernen - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.fhem.de/w/index.php?action=history&amp;feed=atom&amp;title=TRIM-Funktion-Anfangs%2FEndLeerzeichen_aus_Strings_entfernen"/>
	<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=TRIM-Funktion-Anfangs/EndLeerzeichen_aus_Strings_entfernen&amp;action=history"/>
	<updated>2026-04-19T03:11:13Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in FHEMWiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=TRIM-Funktion-Anfangs/EndLeerzeichen_aus_Strings_entfernen&amp;diff=1756&amp;oldid=prev</id>
		<title>Markusbloch am 11. Mai 2013 um 22:38 Uhr</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=TRIM-Funktion-Anfangs/EndLeerzeichen_aus_Strings_entfernen&amp;diff=1756&amp;oldid=prev"/>
		<updated>2013-05-11T22:38:17Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&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: #202122; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Version vom 12. Mai 2013, 00:38 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-l32&quot;&gt;Zeile 32:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Zeile 32:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;  &amp;lt;nowiki&amp;gt;trim(&amp;quot; Hallo Welt! &amp;quot;);&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; 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;  &amp;lt;nowiki&amp;gt;trim(&amp;quot; Hallo Welt! &amp;quot;);&amp;lt;/nowiki&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Kategorie:Code Snippets]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key c1fhemwiki:diff:1.41:old-1043:rev-1756:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Markusbloch</name></author>
	</entry>
	<entry>
		<id>http://wiki.fhem.de/w/index.php?title=TRIM-Funktion-Anfangs/EndLeerzeichen_aus_Strings_entfernen&amp;diff=1043&amp;oldid=prev</id>
		<title>Generix: Die Seite wurde neu angelegt: „Leider gibt es in Perl keine LTRIM, RTRIM oder gar die zusammengesetzte TRIM funktion. Diese entfernt aus dem übergebenen String die beginnenden (LTRIM) oder …“</title>
		<link rel="alternate" type="text/html" href="http://wiki.fhem.de/w/index.php?title=TRIM-Funktion-Anfangs/EndLeerzeichen_aus_Strings_entfernen&amp;diff=1043&amp;oldid=prev"/>
		<updated>2013-05-10T20:42:14Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „Leider gibt es in Perl keine LTRIM, RTRIM oder gar die zusammengesetzte TRIM funktion. Diese entfernt aus dem übergebenen String die beginnenden (LTRIM) oder …“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Leider gibt es in Perl keine LTRIM, RTRIM oder gar die zusammengesetzte TRIM funktion. Diese entfernt aus dem übergebenen String die beginnenden (LTRIM) oder die abschließenden (RTRIM) Leerzeichen. Für beide Funktionen existiert TRIM.&lt;br /&gt;
&lt;br /&gt;
Um diese nun zu integrieren muss man 99_MyUtils.pm editieren und folgende Zeilen hinzufügen:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Seit 10/2012 sind diese Funktionen Bestandteil der fhem-Standardauslieferung. Sie liegen in 99_Utils.pm unter den Namen trim($), ltrim($), rtrim($).&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;# [http://www.somacon.com/p114.php http://www.somacon.com/p114.php]&lt;br /&gt;
# Perl trim function to remove whitespace from the start and end of the string&lt;br /&gt;
sub trim($)&lt;br /&gt;
{ &lt;br /&gt;
  my $string = shift;&lt;br /&gt;
  $string =~ s/^\s+//;&lt;br /&gt;
  $string =~ s/\s+$//;&lt;br /&gt;
  return $string;&lt;br /&gt;
} &lt;br /&gt;
# Left trim function to remove leading whitespace&lt;br /&gt;
sub ltrim($)&lt;br /&gt;
{&lt;br /&gt;
  my $string = shift;&lt;br /&gt;
  $string =~ s/^\s+//;&lt;br /&gt;
  return $string;&lt;br /&gt;
}&lt;br /&gt;
# Right trim function to remove trailing whitespace&lt;br /&gt;
sub rtrim($)&lt;br /&gt;
{&lt;br /&gt;
  my $string = shift;&lt;br /&gt;
  $string =~ s/\s+$//;&lt;br /&gt;
  return $string;&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Ein Beispielaufruf:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;trim(&amp;quot; Hallo Welt! &amp;quot;);&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Generix</name></author>
	</entry>
</feed>