Example Code

Remove Characters From a String Array

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
This code allows the user to remove unwanted string characters from a 2-D string array from file or from a test string control.


Description
This code was developed as an example to remove spaces from a 2-D array of strings.  The strings themselves had spaces between each character which needed to be removed before they could be converted to a numeric.  In the code, the strings are engineering strings, though they could easily be any string, simply replace the string to numeric converter to a different VI to suit your needs.

 
Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Configure a test string (defaulted to \code display)
  1. Open " String Remove Example 2012 NIVerified.vi"
  2. Run the program

 

Additional Information or References
VI Block Diagram

 5-156.png

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Bobby Breyer
Applications Engineer
National Instruments

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