Skip to content

Commit 29e03f2

Browse files
committed
Add trim method
1 parent 91b92d9 commit 29e03f2

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

_data/methods.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ shift:
210210
type: int
211211
name: places
212212
desc: 'The number of places to shift the decimal point by. A positive shift moves the decimal point to the right, a negative shift moves the decimal point to the left.'
213+
trim:
214+
name: trim
215+
return:
216+
desc: 'A copy of this decimal without trailing zeroes.'
217+
type: Decimal
213218
precision:
214219
name: precision
215220
return:

_includes/rounding.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ You can also use the corresponding [PHP constants](http://php.net/manual/en/func
3030
{% include method.md method=site.data.methods.ceil %}
3131
{% include method.md method=site.data.methods.truncate %}
3232
{% include method.md method=site.data.methods.round %}
33+
{% include method.md method=site.data.methods.trim %}
3334
{% include method.md method=site.data.methods.toFixed %}

0 commit comments

Comments
 (0)