LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Distinguishing Capitalised alphabats in a string

Hi I'm an amatuer at Labview and am encountering a problem. I'm hoping if someone can tell me if it possible in labview to distinguish the words in a string of the form, "RajatKumarWasAtTheZooYesterday".

So, here I'm looking to write a program that can identify and distinguish the strings: Rajat Kumar Was At The Zoo Yesterday

 

I hope to represent each word in a different way and so would require a program that can identify special characters, such as capitalized alphabats.

 

Second query: Is it possible to distinguish certain special characters in a string. For example, if the string is "RajatKumar,WasAtTheZooYesterday123", I would want to identify the comma after RajatKumar and/or the numbers123 at the end.

 

Thanks for helping out!!

Rajat

0 Kudos
Message 1 of 9
(3,489 Views)

First I would recommend Google the term ASCII. In the comparison palette you will also find some string compare options. Then working with strings it can sometimes like you do it will in most cases be more easy to convert it to a byte array.



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 2 of 9
(3,484 Views)

hmmm..... using ASCII codes is a good idea.

 

But how do I convert a character to its ASCII code, in LabView. Is there a specifioc command for that????

 

But thanks, its a good thought.

 

Cheers!!

0 Kudos
Message 3 of 9
(3,471 Views)

to know whether it is a capital letter, convert to byte if> 65 and <91 it is a capital letter. Converting the string to a byte array will give you the decimal value of the ascii representation.

 

Have attaced an Ascii table

------------------------------------------------------------------------------------------------------
"Everything should be made as simple as possible but no simpler"
Message 4 of 9
(3,466 Views)

In order to convert a string to byte array just use this function

sample.PNG



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 5 of 9
(3,457 Views)

thanks guys... I figured it out...!!

 

cheers.

Rajat

0 Kudos
Message 6 of 9
(3,451 Views)

CapStrings.png

Omar
0 Kudos
Message 7 of 9
(3,398 Views)

Regexes are amongst my favorite things, also keep in mind the not-so-often used 'Lexical Class'

 

LexicalClass.png

0 Kudos
Message 8 of 9
(3,385 Views)

 


@RAJAT123 wrote:

"... alphabats ..."


I guess these are the ones that appear first from under the congress bridge in the evening. 😄

 

Message 9 of 9
(3,377 Views)