<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="https://www.schweda.net/style_feed.css" ?>
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
    xmlns:atom="http://www.w3.org/2005/Atom"	
	xmlns:dc="http://purl.org/dc/elements/1.1/" > 
<channel>
    <title>schweda.net - Blog</title>
    <link>https://www.schweda.net/</link>
    <description>schweda.net - Blog - Blog-Beitraege</description>
    <language>de-at</language>
    <copyright>Copyright 2006-2026</copyright>
    <generator>schweda.net</generator>
    <managingEditor>heinz.schweda@schweda.net (Heinz Schweda)</managingEditor>
    <webMaster>heinz.schweda@schweda.net (Heinz Schweda)</webMaster>
    <category>Blog</category>
	<atom:link href="https://www.schweda.net/blog_rss.php?bid=628" rel="self" type="application/rss+xml" />
<item>
<title><![CDATA[Zerlegen einer Zeichenkette mit fixen Trennzeichen]]></title>
<description><![CDATA[
<p>Die nachstehenden Snippets sollen zeigen, wie man aus einem String mit fixen Trennzeichen die einzelnen Elemente extrahieren kann.
</p>


<p>Variante 1: Den String mithilfe der Funktion str2con() in einen Container umwandeln
</p>


<pre class="pre_blog_axcode">
static void Job1(Args _args)
{
    str paramAsStr = &quot;Wert1@@Wert2@@Wert3&quot;;
    container paramAsCon;
    int i;

    paramAsCon = str2con(paramAsStr, &quot;@@&quot;);
    
    for (i=1;i&lt;=conLen(paramAsCon);i++)
    {
        info(conPeek(paramAsCon, i));    
    }
}
</pre>


<p>
Variante 2: Den String unter Verwendung der Funktion strSplit() in eine List umzuwandeln
</p>


<pre class="pre_blog_axcode">
static void Job1(Args _args)
{
    str paramAsStr = &quot;Value 1|Value 2|Value 3&quot;;
    List paramAsList;
    ListEnumerator le;

    paramAsList = strSplit(paramAsStr, &quot;|&quot;);
    
    le = paramAsList.getEnumerator();
    while(le.moveNext())
    {
        info(le.current());    
    }
}
</pre>




<p>&nbsp;
</p>]]></description>
<category>Microsoft Dynamics AX (Axapta)</category>
<pubDate>Tue, 22 May 2018 19:44:00 +0200</pubDate>
<link>https://www.schweda.net/blog_ax.php?bid=628</link>
<comments>https://www.schweda.net/blog_ax.php?bid=628</comments>
<guid isPermaLink="true">https://www.schweda.net/blog_ax.php?bid=628</guid>
<author>heinz.schweda@schweda.net (Heinz Schweda)</author>
<wfw:commentRss>https://www.schweda.net/blog_ax.php?bid=628</wfw:commentRss>
</item>
</channel>
</rss>	
