Skip to content

Commit

Permalink
Merge pull request NEKOGET#396 from jyggen/1.3/develop
Browse files Browse the repository at this point in the history
Added Str::upper() and Str::sub().
  • Loading branch information
frankdejonge committed Aug 29, 2012
2 parents ce0ba54 + f007066 commit 43c4c5f
Showing 1 changed file with 104 additions and 1 deletion.
105 changes: 104 additions & 1 deletion classes/str.html
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,57 @@ <h4 class="method" id="method_alternator">alternator(*$args)</h4>
</table>
</article>

<article>
<h4 class="method" id="method_upper">upper($str, $encoding = null)</h4>
<p>The <strong>upper</strong> method converts all characters to uppercase. It is equivalent to PHP's strtoupper() for your specific character encoding.</p>
<table class="method">
<tbody>
<tr>
<th class="legend">Static</th>
<td>Yes</td>
</tr>
<tr>
<th>Parameters</th>
<td>
<table class="parameters">
<tr>
<th>Param</th>
<th>Type</th>
<th>Default</th>
<th class="description">Description</th>
</tr>
<tr>
<th><kbd>$string</kbd></th>
<td><em>string</em></td>
<td><em>Required</em></td>
<td>The input string.</td>
</tr>
<tr>
<th><kbd>$encoding</kbd></th>
<td><em>string</em></td>
<td><pre class="php"><code>null</code></pre></td>
<td>The character encoding.</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Returns</th>
<td>string</td>
</tr>
<tr>
<th>Example</th>
<td>
<pre class="php"><code>Str::upper('User Data'); // returns 'USER DATA'</code></pre>
</td>
</tr>
</tbody>
</table>
</article>

<article>
<h4 class="method" id="method_lower">lower($str, $encoding = null)</h4>
<p>The <strong>lower</strong> method converts all characters to lowercase. It is equivalent to PHP's strtolower() for your specific character encoding.</p>
<p>The <strong>lower</strong> method converts all characters to lowercase. It is equivalent to PHP's strtolower() for your specific character encoding.</p>
<table class="method">
<tbody>
<tr>
Expand Down Expand Up @@ -620,6 +668,61 @@ <h4 class="method" id="method_ends_with">ends_with($str, $end, $ignore_case = fa
</table>
</article>

<article>
<h4 class="method" id="method_sub">sub($str, $start, $length = null, $encoding = null)</h4>
<p>The <strong>sub</strong> method returns the portion of the string specified. It is equivalent to PHP's substr() for your specific character encoding.</p>
<table class="method">
<tbody>
<tr>
<th class="legend">Static</th>
<td>Yes</td>
</tr>
<tr>
<th>Parameters</th>
<td>
<table class="parameters">
<tr>
<th>Param</th>
<th>Default</th>
<th class="description">Description</th>
</tr>
<tr>
<th><kbd>$str</kbd></th>
<td><em>required</em></td>
<td>The input string.</td>
</tr>
<tr>
<th><kbd>$start</kbd></th>
<td><em>required</em></td>
<td>Position of first character. See <a href="http://php.net/substr" target="_blank">php.net</a> for detailed usage.</td>
</tr>
<tr>
<th><kbd>$length</kbd></th>
<td><pre class="php"><code>null</code></pre></td>
<td>Maximum number of characters. See <a href="http://php.net/substr" target="_blank">php.net</a> for detailed usage.</td>
</tr>
<tr>
<th><kbd>$encoding</kbd></th>
<td><pre class="php"><code>null</code></pre></td>
<td>The character encoding.</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>Returns</th>
<td>string</td>
</tr>
<tr>
<th>Example</th>
<td>
<pre class="php"><code>Str::sub('User Data', 3, -1); // returns 'r Dat'</code></pre>
</td>
</tr>
</tbody>
</table>
</article>

</div>

<footer>
Expand Down

0 comments on commit 43c4c5f

Please sign in to comment.