Struct yash_syntax::syntax::Trim
source · [−]pub struct Trim {
pub side: TrimSide,
pub length: TrimLength,
pub pattern: Word,
}
Expand description
Parameter expansion modifier that removes the beginning or end of the value being expanded.
Examples of trims include #foo
, ##bar
and %%baz*
.
A trim is composed of a side, length and pattern.
Fields
side: TrimSide
Which side of the value should be removed?
length: TrimLength
How long the pattern should match?
pattern: Word
Pattern to be matched with the expanded value.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Trim
impl !UnwindSafe for Trim
Blanket Implementations
Mutably borrows from an owned value. Read more