In Case 1, i trim it before assigning it to variable "code". After
trim, it should remove SPACE then it should display length as  "2"
but why it is displayed as "3" ??

FYI, Trim function remove space.


-Hokrani

On Nov 12, 2:34 pm, "Siddique Shahzad" <[EMAIL PROTECTED]>
wrote:
> Hey,
>
> Here is, what i found:
>
> In Case1:
> there is a SPACE after "," and before "IN"
>
> where in  Case2:
> There is a TAB Key press after "," and before "IN"
>
> That's why in Case1 SPACE is being considered as 1 character.
>
> Am I correct?
>
> Regards,
> Siddique Shahzad
>
> On Wed, Nov 12, 2008 at 2:00 PM, Hoks <[EMAIL PROTECTED]> wrote:
>
> > We can reproduce as Chethu explained in her previous mail.
>
> > Now we can get "3" for Case 1 and "2" for Case 2
>
> > -Hokrani
>
> > On Nov 12, 12:13 pm, "chethu kp" <[EMAIL PROTECTED]> wrote:
> > > Please once again look in to the issue.. i have attached Text Doc with
> > this
> > > mail.. download it .. use Ctrl+a to select and ctrl+v to paste (i know u
> > > guys know how to select i m just explaining the steps to reproduce the
> > > issue)
> > > it should work..
> > > Now u get 3 for Case1 and 2 for Case2
>
> > > Regards
> > > Chethana
>
> > > On Wed, Nov 12, 2008 at 12:36 PM, Sreedhar Mallipeddi <
>
> > > [EMAIL PROTECTED]> wrote:
> > > > Hi
>
> > > > i'm also getting "2" in both the cases, I'm using QTP 9.5.....
>
> > > > Thanks,
> > > > Sreedhar
>
> > > > On Wed, Nov 12, 2008 at 12:17 PM, Ahamed Saifudeen <
> > > > [EMAIL PROTECTED]> wrote:
>
> > > >> I am getting 2 with QTP 9.2 also.
>
> > > >> On Wed, Nov 12, 2008 at 12:16 PM, Ahamed Saifudeen <
> > > >> [EMAIL PROTECTED]> wrote:
>
> > > >>> Sounds weird.
> > > >>> I am using QTP 9.5.
>
> > > >>> Let me check with 9.2.
>
> > > >>> On Wed, Nov 12, 2008 at 12:14 PM, Hokrani <[EMAIL PROTECTED]> wrote:
>
> > > >>>> But in my system:
>
> > > >>>> Case 1 : it displayed as 3
> > > >>>> Case 2 : it displayed as 2.
>
> > > >>>> I'm using QTP 9.2 version.
>
> > > >>>> -Hokrani
>
> > > >>>> On Wed, Nov 12, 2008 at 12:12 PM, Ahamed Saifudeen <
> > > >>>> [EMAIL PROTECTED]> wrote:
>
> > > >>>>> Hello,
> > > >>>>> It displays 2 as the length in the both of the cases.
>
> > > >>>>> Regards,
> > > >>>>> Saif
>
> > > >>>>> On Wed, Nov 12, 2008 at 12:04 PM, Hokrani <[EMAIL PROTECTED]>
> > wrote:
>
> > > >>>>>> Hi All,
> > > >>>>>>               In below code i am trying to split the string by ','
> > > >>>>>> (i.e. to extract country code by comma). In Case 1, it display
> > length of
> > > >>>>>> value is 3 and In Case 2, it displayed as 2.
>
> > > >>>>>> 'Case 1
> > > >>>>>> Temp1="Chennai (Madras), IN"
> > > >>>>>> Temp=split(Temp1,",")
> > > >>>>>> code=Trim(Temp(1))
> > > >>>>>> Msgbox Len(code)
>
> > > >>>>>> 'Case 2
> > > >>>>>> Temp1="Chennai (Madras), IN"
> > > >>>>>> Temp=split(Temp1,",")
> > > >>>>>> ccode=Trim(Temp(1))
> > > >>>>>> Msgbox Len(ccode)
>
> > > >>>>>> Can anyone explain the difference ??
>
> > > >>>>>> -Hokrani
>
> > > > --
> > > > Mallipeddi Sreedhar
> > > > 91-9848871279
>
> > > [Split_1.txt< 1K ]'Case 1
> > > Temp1="Chennai (Madras), IN"
> > > Temp=split(Temp1,",")
> > > code=Trim(Temp(1))
> > > Msgbox Len(code)
>
> > > 'Case 2
> > > Temp1="Chennai (Madras), IN"
> > > Temp=split(Temp1,",")
> > > ccode=Trim(Temp(1))
> > > Msgbox Len(ccode)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to