1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/// Checks if `string` ends with the given `target` string.
///
/// # Arguments
///
/// * `string` - The string to inspect.
/// * `target` - The string to search for.
/// * `position` - An Option representing the position to search up to.
/// If no value is provided, the function will search up to the end of the `string`.
///
/// # Returns
///
/// Returns true if the `string` ends with the `target` string, otherwise false.
///
/// # Example
///
/// ```rust
/// use lorust::ends_with;
///
/// let ends_with = ends_with("abc".to_string(), "c".to_string(), None);
/// assert!(ends_with);
/// ```