Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

how to count word in second position in string

former_member459142
Participant
0 Kudos
149

hi

how to count word in second position in string

i have DT09

now i want to give condition on second word T.

ex: if DT09(2) = T

thanks

7 REPLIES 7

Former Member
0 Kudos
72

hi. use it as

data: text(10).
text = 'DT02'.
if text+1(2) = 'T'.
 write: ' 2nd letter is T'.
endif.

Edited by: tahir naqqash on Mar 18, 2009 9:05 AM

Edited by: tahir naqqash on Mar 18, 2009 9:08 AM

Former Member
0 Kudos
72

Hi Guptaprashant,

Try IF DT09+1(1) = T.

Regards

Shital

NeerajRao
Explorer
0 Kudos
72

Hi,

U can use text+(0)2 to retrieve the 2nd Letter od the word.

Former Member
0 Kudos
72

HI,

you do like this

ex: if DT09(2) = T

Try this

suppose u have string

str = 'ABSCGDTRU'

you want second letter of this string .i.e. B.

do like this


str+1(2)
"this gives u the second letter .e.i. B.  

hope this help you

Regatds

Ritesh J

sarbajitm
Contributor
0 Kudos
72

data: text(10).

text = 'DT02'.

if text+(2) = 'T'.

write: ' 2nd letter is T'.

endif.

former_member459142
Participant
0 Kudos
72

THANKS

Former Member
0 Kudos
72

if you got your answer.kindly close this post