ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

Example Code

Removing Substrings from a String in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

Coding that exemplifies how to remove all occurrences of a certain substrings from a larger string.

 

Description

This code removes all instances of a selected character by continuously searching and removing each individual instance until no further instances of the substring remain. In other words, the output character string will be a copy of the original string with all instances of the substring removed.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code
1. Run the VI.
2. From the pull-down menu on the front panel, choose which substring you want to match.
3. Click the OK button.

 

Additional Information or References

Capture.PNG

Caleb Harris

National Instruments | http://www.ni.com/support

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.