html-ui.trim-end
- description
- The text without the spaces and newlines at the end
- type
Fn(text: String) -> String
- expression
fn(text$0) => let length$1 = @core.string-length(value: $0); let last$2 = @core.string-slice(value: $0, start: @std.max(a: 0, b: @core.minus(left: $1, right: 1)), end: $1); match @core.or(left: @core.equal(left: $2, right: "\n"), right: @core.equal(left: $2, right: " ")) { true => @html-ui.trim-end(text: @core.string-slice(value: $0, start: 0, end: @core.minus(left: $1, right: 1))), false => $0 }
- visibility
- public
html-ui.trim-end (project html-ui, branch main, snapshot Daaw3vbJhY15cDW6JsA4JuXvffjj_qFyxoZQMUM8hvQ) id: qjsWUQXbgsHzTyt115Jz2l3LWmLn23YGA_LDy7mzMi4 content hash: UKugxfdoQUxqVOjHjBSv1NCY62mY8L6U9KPqzBd186c