pub fn from_sign(sign: &str) -> Result<CompOp, ()> {
        match sign.trim().as_ref() {
            "==" | "=" => Ok(CompOp::Eq),
            "!=" | "!" | "<>" => Ok(CompOp::Ne),
            "<" => Ok(CompOp::Lt),
            "<=" => Ok(CompOp::Le),
            ">=" => Ok(CompOp::Ge),
            ">" => Ok(CompOp::Gt),
            _ => Err(()),
        }
    }
/// Get a comparison operator by it's sign.
/// Whitespaces are stripped from the sign string.
/// An error is returned if the sign isn't recognized.
///
/// The following signs are supported:
///
/// * `==` _or_ `=` -> `Eq`
/// * `!=` _or_ `!` _or_ `<>` -> `Ne`
/// * `< ` -> `Lt`
/// * `<=` -> `Le`
/// * `>=` -> `Ge`
/// * `> ` -> `Gt`
///
/// # Examples
///
/// ```
/// use version_compare::CompOp;
///
/// assert_eq!(CompOp::from_sign("=="), Ok(CompOp::Eq));
/// assert_eq!(CompOp::from_sign("<"), Ok(CompOp::Lt));
/// assert_eq!(CompOp::from_sign("  >=   "), Ok(CompOp::Ge));
/// assert!(CompOp::from_sign("*").is_err());
/// ```
Get a comparison operator by it's sign.
Whitespaces are stripped from the sign string.
An error is returned if the sign isn't recognized.

The following signs are supported.


Get a comparison operator by it ' s sign . Whitespaces are stripped from the sign string . An error is returned if the sign isn ' t recognized . The following signs are supported .
pub fn from_sign(sign: &str) -> Result<CompOp, ()> {
        match sign.trim().as_ref() {
            "==" | "=" => Ok(CompOp::Eq),
            "!=" | "!" | "<>" => Ok(CompOp::Ne),
            "<" => Ok(CompOp::Lt),
            "<=" => Ok(CompOp::Le),
            ">=" => Ok(CompOp::Ge),
            ">" => Ok(CompOp::Gt),
            _ => Err(()),
        }
    }
pub fn from_sign ( sign : & str ) -> Result < CompOp , ( ) > { match sign . trim ( ) . as_ref ( ) { " " | " " => Ok ( CompOp :: Eq ) , " " | " " | " " => Ok ( CompOp :: Ne ) , " " => Ok ( CompOp :: Lt ) , " " => Ok ( CompOp :: Le ) , " " => Ok ( CompOp :: Ge ) , " " => Ok ( CompOp :: Gt ) , _ => Err ( ( ) ) , } }
Get a comparison operator by it's sign.
Get a comparison operator by it ' s sign .
sign
&str
sign
&str
examples
```
use version_compare::CompOp.


` ` ` use version_compare :: CompOp .