Home General

Truncating strings

edited March 2010 in General
Is there a function in RB that truncates a string like any of the LEFT(),
RIGHT() and SUBSTRING() functions in Excel?

For example: SUBSTRING("Empty",1,3) would result in "Emp" being
returned.

Comments

  • edited March 2010
    "Steve Latta" wrote in message news:4ba3e389@mail....

    If you mean in RAP code, you can use Copy

    Copy('Empty', 1, 3) would give you Emp
    Copy('Empty', 3, 3) would give you pty
    Copy('Empty', 2, 3) would give you mpt

    Regards, Paul.
  • edited March 2010
    Thanks Paul, that worked like a charm. I hadn't thought to look at the Copy
    command.

    Steve


This discussion has been closed.