[−][src]Struct rust_algorithm::Algorithm
Methods
impl Algorithm
[src]
pub fn gcd_of_strings(str1: String, str2: String) -> Option<String>
[src]
求两个字符串的最大公约字符串
Arguments
str1
- 第一个字符串str2
- 第二个字符串
Examples
use rust_algorithm::Algorithm; let result = Algorithm::gcd_of_strings(String::from("ABCABCABC"), String::from("ABC")); assert_eq!(result.unwrap(), "ABC");
pub fn gcd(int1: i32, int2: i32) -> i32
[src]
Auto Trait Implementations
impl Send for Algorithm
impl Unpin for Algorithm
impl Sync for Algorithm
impl RefUnwindSafe for Algorithm
impl UnwindSafe for Algorithm
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,