blob: 791e7c0ed6b3fb030af0edb1853cdf742d7fbbe9 [file] [log] [blame]
khfaraaz82@gmail.comc526fe92012-08-10 22:09:13 +00001/*
2 * Testcase Name : substr01.aql
3 * Description : Test substring2(string,position) built in function.
4 * Success : Yes
5 * Date : 18th April 2012
6 */
7
8write output to nc1:"rttest/string_substr01.adm";
9
10let $str1:="Hello World"
11let $str2:=substring2($str1,10)
12
13let $str3:="This is a test string"
14let $str4:=substring2($str3,21)
15
16let $str5:="This is a test string"
17let $str6:=substring2($str5,22)
18
19let $str7:="This is a test string"
20let $str8:=substring2($str7,0)
21
22let $str9:="This is a test string"
23let $str10:=substring2($str9,-1)
24
25let $str11:="This is a test string"
26let $str12:="This is a another test string"
27let $str13:=substring2(string-concat([$str11,$str12]),21)
28
29let $str14:=substring2("UC Irvine",string-length("UC Irvine")/2)
30return { "str2":$str2,"str4":$str4,"str6":$str6,"str8":$str8,"str10":$str10,"str13":$str13,"str14":$str14}