Skip to main content

graphrecords_query/traits/
string_operations.rs

1pub trait Trim {
2    type ReturnOperand;
3
4    fn trim(&self) -> Self::ReturnOperand;
5}
6
7pub trait TrimStart {
8    type ReturnOperand;
9
10    fn trim_start(&self) -> Self::ReturnOperand;
11}
12
13pub trait TrimEnd {
14    type ReturnOperand;
15
16    fn trim_end(&self) -> Self::ReturnOperand;
17}
18
19pub trait Lowercase {
20    type ReturnOperand;
21
22    fn lowercase(&self) -> Self::ReturnOperand;
23}
24
25pub trait Uppercase {
26    type ReturnOperand;
27
28    fn uppercase(&self) -> Self::ReturnOperand;
29}
30
31pub trait Slice {
32    type ReturnOperand;
33
34    fn slice(&self, start: usize, end: usize) -> Self::ReturnOperand;
35}
36
37pub trait Split<A> {
38    type ReturnOperand;
39
40    fn split(&self, delimiter: A) -> Self::ReturnOperand;
41}
42
43pub trait StartsWith<A> {
44    type ReturnOperand;
45
46    fn starts_with(&self, argument: A) -> Self::ReturnOperand;
47}
48
49pub trait EndsWith<A> {
50    type ReturnOperand;
51
52    fn ends_with(&self, argument: A) -> Self::ReturnOperand;
53}
54
55pub trait Contains<A> {
56    type ReturnOperand;
57
58    fn contains(&self, argument: A) -> Self::ReturnOperand;
59}
60
61pub trait Replace<A, B> {
62    type ReturnOperand;
63
64    fn replace(&self, old: A, new: B) -> Self::ReturnOperand;
65}
66
67pub trait ReplaceAll<A, B> {
68    type ReturnOperand;
69
70    fn replace_all(&self, old: A, new: B) -> Self::ReturnOperand;
71}
72
73pub trait Length {
74    type ReturnOperand;
75
76    fn length(&self) -> Self::ReturnOperand;
77}
78
79pub trait StripPrefix<A> {
80    type ReturnOperand;
81
82    fn strip_prefix(&self, prefix: A) -> Self::ReturnOperand;
83}
84
85pub trait StripSuffix<A> {
86    type ReturnOperand;
87
88    fn strip_suffix(&self, suffix: A) -> Self::ReturnOperand;
89}
90
91pub trait Reverse {
92    type ReturnOperand;
93
94    fn reverse(&self) -> Self::ReturnOperand;
95}
96
97pub trait PadStart<W, C> {
98    type ReturnOperand;
99
100    fn pad_start(&self, width: W, character: C) -> Self::ReturnOperand;
101}
102
103pub trait PadEnd<W, C> {
104    type ReturnOperand;
105
106    fn pad_end(&self, width: W, character: C) -> Self::ReturnOperand;
107}
108
109pub trait Matches<A> {
110    type ReturnOperand;
111
112    fn matches(&self, pattern: A) -> Self::ReturnOperand;
113}