Skip to content

Commit 4eff559

Browse files
committed
docs: add fmt command
Signed-off-by: Gabor Boros <[email protected]>
1 parent ce76cd1 commit 4eff559

File tree

28 files changed

+247
-0
lines changed

28 files changed

+247
-0
lines changed

_jekyll/_data/api_java.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@
219219
permalink: upcase
220220
- name: downcase
221221
permalink: downcase
222+
- name: fmt
223+
permalink: fmt
222224
- section:
223225
name: Math and logic
224226
commands:

_jekyll/_data/api_javascript.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@
219219
permalink: upcase
220220
- name: downcase
221221
permalink: downcase
222+
- name: fmt
223+
permalink: fmt
222224
- section:
223225
name: Math and logic
224226
commands:

_jekyll/_data/api_python.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,8 @@
217217
permalink: upcase
218218
- name: downcase
219219
permalink: downcase
220+
- name: fmt
221+
permalink: fmt
220222
- section:
221223
name: Math and logic
222224
commands:

_jekyll/_data/api_ruby.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@
215215
permalink: upcase
216216
- name: downcase
217217
permalink: downcase
218+
- name: fmt
219+
permalink: fmt
218220
- section:
219221
name: Math and logic
220222
commands:

api/java/index.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,6 +1932,28 @@ Result:
19321932

19331933
[Read more about this command &rarr;](split/)
19341934

1935+
## [fmt](fmt/) ##
1936+
1937+
{% apibody %}
1938+
r.fmt(string, object) &rarr; string
1939+
{% endapibody %}
1940+
1941+
Formats a template string based on a string-string key-value object.
1942+
1943+
__Example:__
1944+
1945+
```js
1946+
r.fmt("{name} loves {candy}.", {"name": "Bob", "candy": "candy floss"}).run(conn, callback)
1947+
```
1948+
1949+
Result:
1950+
1951+
```js
1952+
"Bob loves candy floss."
1953+
```
1954+
1955+
[Read more about this command &rarr;](fmt/)
1956+
19351957
## [upcase](upcase/) ##
19361958

19371959
{% apibody %}

api/java/string-manipulation/downcase.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ related_commands:
77
upcase: upcase/
88
match: match/
99
split: split/
10+
fmt: fmt/
1011
---
1112

1213
# Command syntax #
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
layout: api-command
3+
language: Java
4+
permalink: api/java/fmt/
5+
command: fmt
6+
related_commands:
7+
match: match/
8+
split: split/
9+
upcase: upcase/
10+
downcase: downcase/
11+
---
12+
13+
# Command syntax #
14+
15+
{% apibody %}
16+
r.fmt(string, object) &rarr; string
17+
{% endapibody %}
18+
19+
# Description #
20+
21+
Formats a template string based on a string-string key-value object.
22+
23+
__Example:__
24+
25+
```java
26+
r.fmt("{name} loves {candy}.",
27+
r.hashMap("name", "Bob").with("candy", "candy floss")
28+
).run(conn, callback)
29+
```
30+
31+
Result:
32+
33+
```java
34+
"Bob loves candy floss."
35+
```

api/java/string-manipulation/match.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ related_commands:
1010
upcase: upcase/
1111
downcase: downcase/
1212
split: split/
13+
fmt: fmt/
1314
---
1415

1516
# Command syntax #

api/java/string-manipulation/split.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ related_commands:
77
upcase: upcase/
88
downcase: downcase/
99
match: match/
10+
fmt: fmt/
1011
---
1112

1213
# Command syntax #

api/java/string-manipulation/upcase.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ related_commands:
77
downcase: downcase/
88
match: match/
99
split: split/
10+
fmt: fmt/
1011
---
1112

1213
# Command syntax #

0 commit comments

Comments
 (0)