<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: [resolved] tMap Expression filter - compare substrings with variable length in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-tMap-Expression-filter-compare-substrings-with-variable/m-p/2331242#M100243</link>
    <description>I have found a better solution in a library StringHandling from Talend. Above problem can be solved with INDEX method which rerutns a starting position of the compared string. 
&lt;BR /&gt;ex:
&lt;BR /&gt;StringHandling.INDEX(a,"abcd")
&lt;BR /&gt;same but in Java:
&lt;BR /&gt;a.indexOf("abcd")</description>
    <pubDate>Wed, 15 May 2013 17:24:27 GMT</pubDate>
    <dc:creator>mertez</dc:creator>
    <dc:date>2013-05-15T17:24:27Z</dc:date>
    <item>
      <title>[resolved] tMap Expression filter - compare substrings with variable length</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tMap-Expression-filter-compare-substrings-with-variable/m-p/2331241#M100242</link>
      <description>I am looking to compare a fixed string with a variable string that can be of different sizes. Let's say that I want to filter rows that matches the following criteria: 
&lt;BR /&gt;Expression filter: 
&lt;BR /&gt;"abcd".compareTo(a.substring(0, 4)) // where a is a string with variable length 
&lt;BR /&gt; 
&lt;BR /&gt;The problem arrises when a="ab" or whenewer its length is lower than 4 characters. In this case "index out of bound exception" is thrown. 
&lt;BR /&gt; 
&lt;BR /&gt;I can solve this with first chechking the variable string lenght but I am looking for a cleaner solution.</description>
      <pubDate>Wed, 15 May 2013 16:46:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tMap-Expression-filter-compare-substrings-with-variable/m-p/2331241#M100242</guid>
      <dc:creator>mertez</dc:creator>
      <dc:date>2013-05-15T16:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tMap Expression filter - compare substrings with variable length</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tMap-Expression-filter-compare-substrings-with-variable/m-p/2331242#M100243</link>
      <description>I have found a better solution in a library StringHandling from Talend. Above problem can be solved with INDEX method which rerutns a starting position of the compared string. 
&lt;BR /&gt;ex:
&lt;BR /&gt;StringHandling.INDEX(a,"abcd")
&lt;BR /&gt;same but in Java:
&lt;BR /&gt;a.indexOf("abcd")</description>
      <pubDate>Wed, 15 May 2013 17:24:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tMap-Expression-filter-compare-substrings-with-variable/m-p/2331242#M100243</guid>
      <dc:creator>mertez</dc:creator>
      <dc:date>2013-05-15T17:24:27Z</dc:date>
    </item>
  </channel>
</rss>

