Compare versions as strings

Posted by Dmitriy on Stack Overflow See other posts from Stack Overflow or by Dmitriy
Published on 2010-05-31T05:15:36Z Indexed on 2010/05/31 5:22 UTC
Read the original article Hit count: 232

Filed under:
|

Comparing version numbers as strings is not so easy...
"1.0.0.9" > "1.0.0.10", but it's not correct.
Obvious way to do it properly is parse these strings, convert to numbers and compare as numbers. Is it other way to do it more "elegant"? For example, boost::string_algo...

© Stack Overflow or respective owner

Related posts about c++

Related posts about string