Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Split Function
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
Hello

I was trying this code to get the count for the inbox and searched and tried to learn and do it.

Iam not able to understand the split function used below.What is that "(1)" used for.

Code:
emailcount=split(inboxvar," ")(1)
emailcount=replace(emailcount ,"(","")
emailcount=replace(emailcount ,")","")


The result iam getting correctly but not able to understand the syntax also.
please explain as what is going on here
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
Code:
Text = "I Like QTP"
str1 = Split(Text," ")(1)
msgbox str1

str1 will have value <<Like>> (Value at index 1 after Splitting the string)

Regards,
Saleel
Reply
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
Thanks Saleel.

thanks for the reply..really appreciate it as none replied
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Split function in string nidhishnair 13 64,749 07-07-2020, 03:47 PM
Last Post: helmzshelmz
Question Split Function Chaithra N 0 1,182 12-18-2019, 11:33 AM
Last Post: Chaithra N
  Split a string with multiple delimiters in VBScript nandha 2 8,667 02-10-2018, 06:44 PM
Last Post: nandha
  Calling a function in a Test Script from a function library anupam4j 3 6,180 06-26-2015, 12:31 AM
Last Post: babu123
Question Deatils on Split action with Nested type sams001 0 3,388 10-30-2012, 03:03 PM
Last Post: sams001

Forum Jump:


Users browsing this thread: 1 Guest(s)