Extract Specific Parts of a String Using TestStand Functions

Updated Sep 30, 2025

Reported In

Software

  • TestStand

Issue Details

I am receiving more than 10 characters from a barcode in TestStand, but I only need the first 10 characters. How can I extract specific parts of a string using TestStand functions?

Solution

TestStand includes built-in string functions such as Left() and Right(), which allow you to extract specific characters from either the beginning or end of a string. For instance, in the example below, we are working with barcode text and only need the first 10 characters. This can be achieved using the following command:

Locals.Variant = Left(Locals.Barcode, 10)

image