View Single Post
  #4   Spotlight this post!  
Unread 08-07-2012, 10:56
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: get character from string

Sorry my other post was so short -- tablets and typing ...

For a little background, a string is identical to an array of characters. So you can convert or cast it back and forth freely depending on which API is more appropriate. The string API is far better for scanning for sequences and patterns, but the array API is sometimes useful for precision work like getting out arbitrary characters and treating them as ASCII bytes.

If you want to extract a portion of a string, even a single character, but still treat it as a string, I'd suggest the string subset node. Indicate which byte and use a size of one. Another useful technique once you have a portion of a string extracted is to wire them to a case structure. The case will switch on Booleans, ints, enums, and strings. You can enter in string elements comma separated to use for matching.

If you need more assistance, be sure to explain more about what you are trying to do.

Greg McKaskle
Reply With Quote