LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
K C

'\' Codes Display

Status: New

To check a string for (white) spaces we can use the ‘\’ Codes Display mode for string Control/Indicator/Constant.

With small pieces of text, it is easy to find your way through the text. However, when the piece of text gets larger it is difficult to navigate through the text.

It would be easier if a ‘\n’ and a ‘\r’ character performs an actual <new line> besides displaying a \ code.

It should be an option or an extra mode. I called it ‘\+’ mode.

 

 

String Display.jpg

5 Comments
dthor
Active Participant

So you want "\n" to still be displayed, but then also have the linefeed. I understand the desire, but technically this changes the data, as each line end would then become "\n\n"

 

A solution would be to let the user decide which \ Codes to display. Only need to check for spaces? Then display only \s codes. Need to look for newlines and CRs? Only codes \n and \r. For your example, you would display all codes except \n.

 

Or perhaps a "Paragraph Marker" mode, similar to what is seen in Word/OpenOffice, would be more suitable? I'm not sure how I feel about this though. It kinda seems like it would detract from the "plaintext feel" of these controls and indicators.

K C
Trusted Enthusiast

Thank you for your comment.

 

The data should not be changed. Only the way the data is presented.

Making a selection of what \ Codes to display, as you say,  is more difficult. If the '\s' codes are displayed it should also display the '\t' codes.

 

The point is that in the '\+' codes display the text is more readable.

AristosQueue (NI)
NI Employee (retired)

> The data should not be changed.

 

How would cut/paste work? When you copied data out of such a string indicator, would you end up with two carriage returns?

JackDunaway
Trusted Enthusiast

If we had access to a function that would return a Formatted String Display, you could realize this '\+' mode as an XControl.

JasonD_at_UML
Member

How about a new option to apply a few simple colorcodes?

 

color "\t" as green

color "\r" as blue

color "\n" as orange

 

or something - Ideally, you'd let the developer choose default colors or custom. Even if they wanted all "a" chars to be hot pink.

 

I use the codes display a lot, particularly for debugging, and I do go a little bleary-eye scanning for tokens.

 

Somewhat related is my ongoing request for simple HTML 1.0 parsing. Bold, Italic, etc.