1 |
There have been a few requests for negative indices in versionator, |
2 |
where -1 would mean "the last component". This conflicts with the range |
3 |
syntax, however, so the meaning of things like -2 would be inconsistent |
4 |
between functions. |
5 |
|
6 |
However... Getting the last index seems to be something that's needed |
7 |
often enough to warrant a proper solution. The attached implements |
8 |
get_version_component_count and get_last_version_component_index. |
9 |
Thoughts? |
10 |
|
11 |
-- |
12 |
Ciaran McCreesh : Gentoo Developer (Wearer of the shiny hat) |
13 |
Mail : ciaranm at gentoo.org |
14 |
Web : http://dev.gentoo.org/~ciaranm |