<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to compare string elements</title><link>https://community.appian.com/discussions/f/general/21011/how-to-compare-string-elements</link><description>How to compare letters of a single word in Appian: 
 Suppose, 
 We have to compare letters of word &amp;quot;Apple&amp;quot;. The output should be: 
 1. Number of unique characters in word. In case of &amp;quot;Apple&amp;quot;, it should be 4 
 2. Could of similar characters. Ex: In case</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to compare string elements</title><link>https://community.appian.com/thread/81983?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 11:03:37 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:e618b488-4d33-4531-94bb-609e52dbce6a</guid><dc:creator>ayushimittal</dc:creator><description>&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compare string elements</title><link>https://community.appian.com/thread/81982?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 11:03:08 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7659ca0e-33e3-4e55-ac26-40bee6dddd51</guid><dc:creator>ayushimittal</dc:creator><description>&lt;p&gt;Thank you for your suggestion.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compare string elements</title><link>https://community.appian.com/thread/81981?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 11:01:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3c8ec2a5-5c15-4784-930f-9971909de85f</guid><dc:creator>ayushimittal</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;/p&gt;
&lt;p&gt;It is not related to any test. I was learning about strings in Appian and this question strike in my mind.&lt;/p&gt;
&lt;p&gt;Thank you so much for your response.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compare string elements</title><link>https://community.appian.com/thread/81860?ContentTypeID=1</link><pubDate>Thu, 20 May 2021 16:30:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9ebac0ee-8ff4-43d1-817a-a9820b352d80</guid><dc:creator>ranjith.shanmugam</dc:creator><description>&lt;p&gt;Hi Ayushimitaal,&lt;/p&gt;
&lt;p&gt;Use Below Code&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!word: &amp;quot;apple&amp;quot;,
  local!letters: apply(
    charat(local!word, _),
    enumerate(len(local!word)) + 1
  ),
  local!unique: union(local!letters, local!letters),
  a!flatten(
    a!forEach(
      local!unique,
      {
        fv!item &amp;amp; &amp;quot;: &amp;quot; &amp;amp; count(wherecontains(fv!item, local!letters))
      }
    )
  )
)&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compare string elements</title><link>https://community.appian.com/thread/81844?ContentTypeID=1</link><pubDate>Thu, 20 May 2021 14:33:41 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:df4a5dd5-4212-4805-86f3-d82105bb6128</guid><dc:creator>davel001150</dc:creator><description>&lt;p&gt;First, my favorite method of breaking a text into an array of texts: char(code(local!text))&lt;/p&gt;
&lt;p&gt;Then, remove&amp;nbsp;duplicate values with union, then grab the length().&lt;/p&gt;
&lt;p&gt;local!splitText: char(code(local!text)),&lt;/p&gt;
&lt;p&gt;length(union(local!splitText, local!splitText))&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To do the second one, you need to have (or make) a split alphabet.&amp;nbsp; Then a!forEach:&lt;/p&gt;
&lt;p&gt;a!forEach(&lt;/p&gt;
&lt;p&gt;items: local!splitAlphabet,&lt;/p&gt;
&lt;p&gt;expression: fv!item &amp;amp; wherecontains(fv!item, local!splitText)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;That&amp;#39;s how I&amp;#39;d do it, or at least how I&amp;#39;d start.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compare string elements</title><link>https://community.appian.com/thread/81841?ContentTypeID=1</link><pubDate>Thu, 20 May 2021 14:06:59 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:cb73886a-c996-45d5-9999-55f2202440e6</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;&lt;a href="https://community.appian.com/discussions/f/rules/20866/count-the-characters-matching-alphabets"&gt;community.appian.com/.../count-the-characters-matching-alphabets&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to compare string elements</title><link>https://community.appian.com/thread/81840?ContentTypeID=1</link><pubDate>Thu, 20 May 2021 14:05:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:07c34183-e8a7-4a0f-97cb-1df146068c08</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Is this some test? Similar&amp;nbsp;question has been asked just recently. Please check the search function.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>