Skip to content

Commit

Permalink
add documentation for str::random('uuid')
Browse files Browse the repository at this point in the history
  • Loading branch information
benharold committed Aug 27, 2013
1 parent 1a85a21 commit 7015980
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions classes/str.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ <h4 class="method" id="method_random">random($type = 'alnum', $length = 8)</h4>
<tr>
<th><kbd>$type</kbd></th>
<td><em>alnum</em></td>
<td>The type of string to generate. Your choices are alnum, numeric, nozero, alpha, distinct, hexdec, unique, and sha1.</td>
<td>The type of string to generate. Your choices are alnum, numeric, nozero, alpha, distinct, hexdec, unique, sha1 and uuid.</td>
</tr>
<tr>
<th><kbd>$length</kbd></th>
<td><pre class="php"><code>16</code></pre></td>
<td>The number of characters you would like the final string to be (unique and sha1 ignore this parameter).</td>
<td>The number of characters you would like the final string to be (unique, sha1 and uuid ignore this parameter).</td>
</tr>
</table>
</td>
Expand Down Expand Up @@ -170,7 +170,11 @@ <h4 class="method" id="method_random">random($type = 'alnum', $length = 8)</h4>

// sha1 (40 character string based on sha1)
Str::random('sha1');
// Returns: af5c5a8cc3be9a3180205c1ed2975015cd6cf1e7</code></pre>
// Returns: af5c5a8cc3be9a3180205c1ed2975015cd6cf1e7

// uuid (version 4 - random)
Str::random('uuid');
// Returns: f47ac10b-58cc-4372-a567-0e02b2c3d479</code></pre>
</td>
</tr>
</tbody>
Expand Down

0 comments on commit 7015980

Please sign in to comment.