Manipulation of strings

Discussion in 'Cadence' started by nour, Sep 15, 2008.

  1. nour

    nour Guest

    Hi! please is therer a skill function that allows me to check if a
    given string begins with another given string?

    I explain:

    s="skill_function"
    q="skill"
    and i want to check that 's' contain 'q' at the beginning.

    Nour
     
    nour, Sep 15, 2008
    #1
  2. nour

    DReynolds Guest

    Nour, there are a variety of functions that will do what you want...
    try looking at nindex and substring...

    David
     
    DReynolds, Sep 15, 2008
    #2
  3. nour

    Riad KACED Guest

    Hi,

    I'd rather go for a regular expression for this request.
    Something like:
    rexMatchp(strcat("^" q) s)

    Cheers,
    Riad.
     
    Riad KACED, Sep 15, 2008
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.