Home > Community > Forums > PCB SKILL > String manipulation in Skill

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 String manipulation in Skill 

Last post Fri, Jul 5 2013 5:54 AM by bulldog. 2 replies.
Started by bulldog 05 Jul 2013 05:22 AM. Topic has 2 replies and 692 views
Page 1 of 1 (3 items)
Sort Posts:
  • Fri, Jul 5 2013 5:22 AM

    • bulldog
    • Top 150 Contributor
    • Joined on Thu, Jul 17 2008
    • Cleveland, OH
    • Posts 51
    • Points 720
    String manipulation in Skill Reply

    I've looked throught the help files and found nothing about string manipulation.  Does anyone know if there is Skill support similar to the VBA functions below?

    For extracting the left "X" characters

    Dim AnyString, MyStr
    AnyString = "Hello World"    ' Define string.
    MyStr = Left(AnyString, 1)    ' Returns "H".
    MyStr = Left(AnyString, 7)    ' Returns "Hello W".

    For extracting the right "X" characters

    Dim AnyString, MyStr
    AnyString = "Hello World"    ' Define string.
    MyStr = Right(AnyString, 1)    ' Returns "d".
    MyStr = Right(AnyString, 6)    ' Returns " World".

    For extracting "X" characters from the middle of a string starting at position "Y"

    Dim MyString, FirstWord, LastWord, MidWords
    MyString = "Mid Function Demo"    ' Create text string.
    FirstWord = Mid(MyString, 1, 3)    ' Returns "Mid".
    LastWord = Mid(MyString, 14, 4)    ' Returns "Demo".

    • Post Points: 20
  • Fri, Jul 5 2013 5:29 AM

    • Pawandeep
    • Top 75 Contributor
    • Joined on Sat, Oct 15 2011
    • Singapore, 00-SG
    • Posts 106
    • Points 1,690
    Re: String manipulation in Skill Reply

    Hi,

     You can use substring funtion as shown below.

    substring("abcdef" 2 4) => "bcde"

    substring("abcdef" 4 2) => "de"

    substring("abcdef" -4 2) => "cd"

    • Post Points: 20
  • Fri, Jul 5 2013 5:54 AM

    • bulldog
    • Top 150 Contributor
    • Joined on Thu, Jul 17 2008
    • Cleveland, OH
    • Posts 51
    • Points 720
    Re: String manipulation in Skill Reply
    Thanks, this is exactly what I was looking for!
    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by bulldog at 05 Jul 2013 05:22 AM. Topic has 2 replies.