Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: How to read part of a string?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default How to read part of a string?

    I want to perform a specific action if the first 2 characters of a
    string are '\\'.

    Thanks.

    Jeff Slarve
    www.jssoftware.com
    Twitter free since Jan 11, 2016
    I'll search help files & Google for you.

    Grammar troll's, are the worse.

  2. #2

    Default Re: How to read part of a string?

    > I want to perform a specific action if the first 2 characters of a
    > string are '\\'.
    >

    IF myString[1:2] = '\\'
    ... action ...
    END


    If the string is ever less than 2 this will GPF

    Tony Tetley

  3. #3

    Default Re: How to read part of a string?

    You can do that in SB?

    Not seeing that this syntax works there.

    Thanks Tony

    Jeff Slarve
    www.jssoftware.com
    Twitter free since Jan 11, 2016
    I'll search help files & Google for you.

    Grammar troll's, are the worse.

  4. #4

    Default Re: How to read part of a string?

    This is what I ended up doing. Not sure if it's the most bestest<g>

    If %_SB_INSTALLDIR% Does Not Equal "%JS_DATA_LOCATION%" Then
    Set Variable %JS_PATH_UNC_CHECK% to
    FUNCTION:Mid(%JS_DATA_LOCATION%, 2, 1)
    If %JS_PATH_UNC_CHECK% Equals "\\" Then
    End
    End

    Jeff Slarve
    www.jssoftware.com
    Twitter free since Jan 11, 2016
    I'll search help files & Google for you.

    Grammar troll's, are the worse.

  5. #5

    Default Re: How to read part of a string?

    > You can do that in SB?
    >
    > Not seeing that this syntax works there.

    Umm. was not paying attention to which group you posted that question.

    No idea if that works in SB, just color me embarrased!

    Tony

  6. #6

    Default Re: How to read part of a string?

    Well, thanks for chiming in.

    Jeff Slarve
    www.jssoftware.com
    Twitter free since Jan 11, 2016
    I'll search help files & Google for you.

    Grammar troll's, are the worse.

  7. #7

    Default Re: How to read part of a string?

    Jeff,

    > I want to perform a specific action if the first 2 characters of a
    > string are '\\'.

    Look at Handle String Operation.

    --
    Lee White

    RPM Report Viewer.: http://www.cwaddons.com/products/rpm/
    RPM Review........: http://www.clarionmag.com/cmag/v11/v11n06rpm.html
    Report Faxing.....: http://www.cwaddons.com/products/afe/
    ---Enroll Today---: http://CWaddons.com

    Creative Reporting: http://www.CreativeReporting.com

    Product Release & Update Notices
    http://twitter.com/DeveloperPLUS

    Windows 8 brings us "The Oval, Bumper Car, Roller Coaster of Wait!"
    And, now, Windows 10 brings us "The Inch Worm, Bumper Car of Wait!"

  8. #8

    Default Re: How to read part of a string?

    Thanks Lee. We're in business.

    Jeff Slarve
    www.jssoftware.com
    Twitter free since Jan 11, 2016
    I'll search help files & Google for you.

    Grammar troll's, are the worse.

  9. #9

    Default Re: How to read part of a string?

    Hi Jeff,

    > Thanks Lee. We're in business.

    Note that you can use Clarion DLLs in SB. I have a DLL that I wrote for
    my installers to perform some actions back several years ago and that
    has worked flawlessly. Back then I had problems getting search/replace
    to work so I wrote that into the dll. Another thing it does is to
    change the ,WIN32 to ,PASCAL for #RUNDLL in templates. It's just plain
    ..clw file that is compiled into a local dll.

    Best regards,

    --
    Arnor Baldvinsson
    Icetips Alta LLC

  10. #10

    Default Re: How to read part of a string?

    Hi Arnor -

    We definitely use our own DLLs as support files. Thanks.

    Jeff Slarve
    www.jssoftware.com
    Twitter free since Jan 11, 2016
    I'll search help files & Google for you.

    Grammar troll's, are the worse.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •