ni.com is currently undergoing scheduled maintenance.

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

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Delete 10 characters this string

Solved!
Go to solution

How to delete the last 10 characters from any string?

0 Kudos
Message 1 of 11
(13,284 Views)

ok , i will just use string length - 10 and String Subset...

sorry, that was easy

0 Kudos
Message 2 of 11
(13,278 Views)
Solution
Accepted by tmarques

!0.png

\

Keep throwing me those easy ones!


"Should be" isn't "Is" -Jay
Message 3 of 11
(13,274 Views)

amazing how i was looking for that and i didnt see lol

0 Kudos
Message 4 of 11
(13,271 Views)

@tmarques wrote:

amazing how i was looking for that and i didnt see lol


In this case you are forgiven since it completely breaks the most basic rule of LabVIEW:

"The function I need is NEVER the first item on the palatte " Smiley LOL


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 11
(13,263 Views)
Optionally, reverse the string, remove the first ten, reverse the string, done.
Message 6 of 11
(13,251 Views)

Or have fun with regex!

 

Ben64

 

remove last 10 characters.png

Message 7 of 11
(13,229 Views)

@ben64 wrote:

Or have fun with regex!

 

Ben64

 

remove last 10 characters.png


What if the string ends with a linefeed? Smiley Surprised Not as much fun thenSmiley Sad


"Should be" isn't "Is" -Jay
Message 8 of 11
(13,227 Views)

Missed this one Smiley Sad

Message 9 of 11
(13,225 Views)

@ben64 wrote:

Missed this one Smiley Sad


Ah but, you won't miss it again!  All is right with the universe!Smiley Happy


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 11
(13,207 Views)