diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-04-11 16:20:23 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-04-11 16:26:32 +0100 |
commit | 16b2ffa97ea8b2872306bc4400605821440f6589 (patch) | |
tree | 931d942815f2fc0b47ae56805edff5973a86359b /sysprep/utils.mli | |
parent | a3d6629a0b54aca6d7b5b38750399b5396cdbf07 (diff) | |
download | libguestfs-16b2ffa97ea8b2872306bc4400605821440f6589.tar.gz libguestfs-16b2ffa97ea8b2872306bc4400605821440f6589.tar.xz libguestfs-16b2ffa97ea8b2872306bc4400605821440f6589.zip |
sysprep: Make a common Utils.compare_command_line_args function.
This isn't quite code motion, since the new function also ignores case
(which previously we didn't ignore).
Diffstat (limited to 'sysprep/utils.mli')
-rw-r--r-- | sysprep/utils.mli | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sysprep/utils.mli b/sysprep/utils.mli index 51426f44..2b7e3208 100644 --- a/sysprep/utils.mli +++ b/sysprep/utils.mli @@ -44,3 +44,8 @@ val skip_dashes : string -> string If the string contains only dash characters, this raises [Invalid_argument "skip_dashes"]. *) + +val compare_command_line_args : string -> string -> int +(** Compare two command line arguments (eg. ["-a"] and ["--V"]), + ignoring leading dashes and case. Note this assumes the + strings are 7 bit ASCII. *) |