aboutsummaryrefslogtreecommitdiff
path: root/files/ca/web/javascript/reference/global_objects/string/trimend
diff options
context:
space:
mode:
authorFlorian Merz <me@fiji-flo.de>2021-02-11 14:45:12 +0100
committerFlorian Merz <me@fiji-flo.de>2021-02-11 14:45:12 +0100
commitcb9e359a51c3249d8f5157db69d43fd413ddeda6 (patch)
treeae3040d626c3b5717da5bda2af9f0a9ff9bd389f /files/ca/web/javascript/reference/global_objects/string/trimend
parent8260a606c143e6b55a467edf017a56bdcd6cba7e (diff)
downloadtranslated-content-cb9e359a51c3249d8f5157db69d43fd413ddeda6.tar.gz
translated-content-cb9e359a51c3249d8f5157db69d43fd413ddeda6.tar.bz2
translated-content-cb9e359a51c3249d8f5157db69d43fd413ddeda6.zip
unslug ca: move
Diffstat (limited to 'files/ca/web/javascript/reference/global_objects/string/trimend')
-rw-r--r--files/ca/web/javascript/reference/global_objects/string/trimend/index.html94
1 files changed, 94 insertions, 0 deletions
diff --git a/files/ca/web/javascript/reference/global_objects/string/trimend/index.html b/files/ca/web/javascript/reference/global_objects/string/trimend/index.html
new file mode 100644
index 0000000000..41ab89e3ca
--- /dev/null
+++ b/files/ca/web/javascript/reference/global_objects/string/trimend/index.html
@@ -0,0 +1,94 @@
+---
+title: String.prototype.trimRight()
+slug: Web/JavaScript/Referencia/Objectes_globals/String/TrimRight
+translation_of: Web/JavaScript/Reference/Global_Objects/String/trimEnd
+---
+<div>{{JSRef}} {{non-standard_header}}</div>
+
+<p>El mètode <strong><code>trimRight()</code></strong> elimina els espais en blanc al final d'un string.</p>
+
+<h2 id="Sintaxi">Sintaxi</h2>
+
+<pre class="syntaxbox"><code><var>str</var>.trimRight()</code></pre>
+
+<h2 id="Descripció">Descripció</h2>
+
+<p>El mètode <code>trimRight()</code> retorna el string sense espais en blanc al final del mateix. <code>trimRight()</code> no afecta el valor del string sino que en retorna un de nou.</p>
+
+<h2 id="Exemples">Exemples</h2>
+
+<h3 id="Utilitzar_trimRight()">Utilitzar <code>trimRight()</code></h3>
+
+<p>L'exemple següent mostra el string <code>' foo'</code>:</p>
+
+<pre class="brush: js; highlight: [5]">var str = ' foo ';
+
+console.log(str.length); // 8
+
+str = str.trimRight();
+console.log(str.length); // 5
+console.log(str); // ' foo'
+</pre>
+
+<h2 id="Especificacions">Especificacions</h2>
+
+<p>No forma part de cap standard. Implementat a JavaScript 1.8.1.</p>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<div>{{CompatibilityTable}}</div>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoDesktop("1.9.1")}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Característica</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Suport bàsic</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="Vegeu_també">Vegeu també</h2>
+
+<ul>
+ <li>{{jsxref("String.prototype.trim()")}}</li>
+ <li>{{jsxref("String.prototype.trimLeft()")}} {{non-standard_inline}}</li>
+</ul>