Wouter Posted September 3, 2011 Report Share Posted September 3, 2011 VI Name: String equal length Total VIs: 2 Description: There are 2 VIs for checking the length of 2 or more strings, after fetching the length it compares the length and returns true if the length of the strings are equal. Note: Maybe there is need to trim whitespaces before fetching the length but this should be a optional feature in my opinion. Blockdiagram: 2 string inputs: Array string input: Code: String Equal Length.zip What are you thoughts on this VI? Would you like to see such a function in OpenG? Can you optimize the code? In which package should it be included? Should it be rejected? Quote Link to comment
Jim Kring Posted September 3, 2011 Report Share Posted September 3, 2011 Playing devil's advocate: What are the common scenarios for testing whether the length of two strings are equal? Quote Link to comment
Aristos Queue Posted September 3, 2011 Report Share Posted September 3, 2011 I can't think of a time since school that I've had to do something like that. There's some lookup optimizations for hash tables, but that's it. Usually, if I'm worried about string length its with respect to graphics space or string parsing, not comparison. Quote Link to comment
Wouter Posted September 3, 2011 Author Report Share Posted September 3, 2011 Currently I use the VI with 2 inputs for a fast function exit when calculating the hamming distance of two strings. The array VI I meanly made because well... I can I'm sure there are probably more use-cases but I can't think of any of them now. Quote Link to comment
gb119 Posted September 5, 2011 Report Share Posted September 5, 2011 I with AQ I think on this - I'm not sure it's a particularly common problem and the code to do it is both simple and obvious. Sure, one could make OpenG an incredibly rich toolkit but with the danger of it taking longer to search for the right function than it would to write the code inline directly. 1 Quote Link to comment
dannyt Posted September 6, 2011 Report Share Posted September 6, 2011 OpenG an incredibly rich toolkit but with the danger of it taking longer to search for the right function than it would to write the code inline directly. This is a very valid concern, and it makes we wonder what if any guideline there should be concerning OpenG functional coverage. Quote Link to comment
Wouter Posted September 6, 2011 Author Report Share Posted September 6, 2011 True I was wondering about that topic as well... because I have a bunch of VI's for all kind of stuff, for example to calculate the Levenshtein distance or Jaro–Winkler distance but I can imagine that not every will need those VI's or want them on the pallet, but other people, like myself, may want them on the pallet... Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.