Results 1 to 2 of 2

Thread: Postscript question

  1. #1
    Join Date
    May 2005
    Location
    Russia
    Beans
    537

    Postscript question

    Good day, everyone!

    I have a string, something like en_US, fr_FR, ru_RU, etc. I need to extract the last two capital letters after the underscore. As you understand there's a fixed number of characters everywhere, so it is probably possible to extract the last two chars.

    This is a gfxboot script so it's not Postscript Level 2 and 'search' operator doesn't work. Tried to google it but there's not much information on Postscript.

    Please help,
    thanks in advance.

  2. #2
    Join Date
    Aug 2005
    Location
    The Local Group
    Beans
    631

    Re: Postscript question

    Isn't it simply:
    Code:
    dup length 2 sub 2 getinterval

Bookmarks

Posting Permissions

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