khfaraaz82@gmail.com | c526fe9 | 2012-08-10 22:09:13 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Testcase Name : substr04.aql |
| 3 | * Description : Test substring2(string,position,position) built in function. |
| 4 | * Success : Yes |
| 5 | * Date : 18th April 2012 |
| 6 | */ |
| 7 | |
| 8 | write output to nc1:"rttest/string_substr04.adm"; |
| 9 | |
| 10 | for $a in [ substring2("hello world",7,11), |
| 11 | substring2("hello world",1,11), |
| 12 | substring2("hello world",3,7), |
| 13 | substring2("ABCD",3,6), |
| 14 | substring2("ABCD",0,4), |
| 15 | substring2("UC Irvine",4,string-length("UC Irvine")), |
| 16 | substring2("UC Irvine",0,string-length("UC Irvine")), |
| 17 | substring2("UC Irvine",1,string-length("UC Irvine")), |
| 18 | substring2(substring2("UC Irvine",4),0,string-length("Irvine")), |
| 19 | substring2(substring2("UC Irvine",4),0,(string-length("Irvine")/2)) |
| 20 | ] |
| 21 | return $a |