Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cheatsheet.md #140

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 6 additions & 12 deletions doc/cheatsheet.md
Expand Up @@ -34,18 +34,12 @@ See [Template expressions](templates.md#expressions)
|------|-----------|
|`<first(attr)>`|The first or only element of attr. You can combine operations to say things like first(rest(names)) to get second element.|
|`<length(attr)>`|Return the length of a mult-valued attribute or 1 if it is single attribute. If attribute is null return 0. Strings are not special; i.e., length("foo") is 1 meaning "1 attribute". Nulls are counted in lists so a list of 300 nulls is length 300. If you don't want to count nulls, use length(strip(list)).
|`<strlen(attr)>`|
Return the length of a string attribute; runtime error if not string.
|`<last(attr)>`|
The last or only element of attr.
|`<rest(attr)>`|
All but the first element of attr. Returns nothing if <attr> is single valued.
|`<reverse(attr)>`|
Return a list with the same elements as v but in reverse order. null values are NOT stripped out. use reverse(strip(v)) to do that.
|`<trunc(attr)>`|
returns all elements but last element
|`<strip(attr)>`|
Return a new list w/o null values.
|`<strlen(attr)>`|Return the length of a string attribute; runtime error if not string.
|`<last(attr)>`|The last or only element of attr.
|`<rest(attr)>`|All but the first element of attr. Returns nothing if <attr> is single valued.
|`<reverse(attr)>`|Return a list with the same elements as v but in reverse order. null values are NOT stripped out. use reverse(strip(v)) to do that.
|`<trunc(attr)>`|returns all elements but last element
|`<strip(attr)>`|Return a new list w/o null values.
|`<trim(attr)>`|Trim whitespace from back/front of a string; runtime error if not string.|

## Statements
Expand Down