@@ -6,22 +6,22 @@ defmodule String do
66
77 The functions in this module act according to the
88 Unicode Standard, version 6.2.0. For example,
9- `titlecase `, `downcase`, `strip` are provided by this
9+ `capitalize/1 `, `downcase/1 `, `strip/1 ` are provided by this
1010 module.
1111
1212 Besides this module, Elixir provides more low-level
13- operations that works directly with binaries. Some
13+ operations that work directly with binaries. Some
1414 of those can be found in the `Kernel` module, as:
1515
16- * `binary_part/2` and `binary_part /3` - retrieves part of the binary
17- * `bit_size/1` and `byte_size/1` - size related functions
18- * `is_bitstring/1` and `is_binary/1` - type checking function
19- * Plus a bunch of conversion functions, like `binary_to_atom/2`,
20- `binary_to_integer/2`, `binary_to_term/1` and their opposite
21- like `integer_to_binary/2`
16+ * `Kernel. binary_part/2` and `Kernelbinary_part /3` - retrieves part of the binary
17+ * `Kernel. bit_size/1` and `Kernel. byte_size/1` - size related functions
18+ * `Kernel. is_bitstring/1` and `Kernel. is_binary/1` - type checking function
19+ * Plus a number of conversion functions, like `Kernel. binary_to_atom/2`,
20+ `Kernel. binary_to_integer/2`, `Kernel. binary_to_term/1` and their opposite
21+ like `Kernel. integer_to_binary/2`
2222
23- Finally, [ the `:binary` module](http://erlang.org/doc/man/binary.html)
24- provides a couple other functions that works on the byte level.
23+ Finally, the [ `:binary` module](http://erlang.org/doc/man/binary.html)
24+ provides a few other functions that work on the byte level.
2525
2626 ## Codepoints and graphemes
2727
@@ -93,7 +93,7 @@ defmodule String do
9393 codepoint needs to be rejected.
9494
9595 This module relies on this behaviour to ignore such invalid
96- characters. For example, `String. length` is going to return
96+ characters. For example, `length/1 ` is going to return
9797 a correct result even if an invalid codepoint is fed into it.
9898
9999 In other words, this module expects invalid data to be detected
@@ -108,7 +108,7 @@ defmodule String do
108108
109109 @ doc """
110110 Checks if a string is printable considering it is encoded
111- as UTF-8. Returns true if so, false otherwise.
111+ as UTF-8. Returns ` true` if so, ` false` otherwise.
112112
113113 ## Examples
114114
@@ -200,7 +200,7 @@ defmodule String do
200200 end
201201
202202 @ doc """
203- Splits a string on sub strings at each Unicode whitespace
203+ Splits a string on substrings at each Unicode whitespace
204204 occurrence with leading and trailing whitespace ignored.
205205
206206 ## Examples
@@ -217,12 +217,12 @@ defmodule String do
217217 defdelegate split ( binary ) , to: String.Unicode
218218
219219 @ doc """
220- Divides a string into sub strings based on a pattern,
221- returning a list of these sub string . The pattern can
220+ Divides a string into substrings based on a pattern,
221+ returning a list of these substrings . The pattern can
222222 be a string, a list of strings or a regular expression.
223223
224224 The string is split into as many parts as possible by
225- default, unless the `global` option is set to false.
225+ default, unless the `global` option is set to ` false` .
226226
227227 ## Examples
228228
@@ -258,7 +258,7 @@ defmodule String do
258258 end
259259
260260 @ doc """
261- Convert all characters on the given string to upcase .
261+ Convert all characters on the given string to uppercase .
262262
263263 ## Examples
264264
@@ -274,7 +274,7 @@ defmodule String do
274274 defdelegate upcase ( binary ) , to: String.Unicode
275275
276276 @ doc """
277- Convert all characters on the given string to downcase .
277+ Convert all characters on the given string to lowercase .
278278
279279 ## Examples
280280
@@ -291,11 +291,11 @@ defmodule String do
291291
292292 @ doc """
293293 Converts the first character in the given string to
294- titlecase and the remaining to downcase .
294+ uppercase and the remaining to lowercase .
295295
296296 This relies on the titlecase information provided
297297 by the Unicode Standard. Note this function makes
298- no attempt in capitalizing all words in the string
298+ no attempt to capitalize all words in the string
299299 (usually known as titlecase).
300300
301301 ## Examples
@@ -430,7 +430,7 @@ defmodule String do
430430 @ doc """
431431 Returns a new binary based on `subject` by replacing the parts
432432 matching `pattern` for `replacement`. By default, it replaces
433- all entries, except if the `global` option is set to false.
433+ all entries, except if the `global` option is set to ` false` .
434434
435435 If the replaced part must be used in `replacement`, then the
436436 position or the positions where it is to be inserted must be
@@ -533,7 +533,7 @@ defmodule String do
533533 remaining of the string or `:no_codepoint` in case
534534 the string reached its end.
535535
536- As the other functions in the String module, this
536+ As with other functions in the String module, this
537537 function does not check for the validity of the codepoint.
538538 That said, if an invalid codepoint is found, it will
539539 be returned by this function.
@@ -674,7 +674,7 @@ defmodule String do
674674
675675 @ doc """
676676 Returns the last grapheme from an utf8 string,
677- nil if the string is empty.
677+ ` nil` if the string is empty.
678678
679679 ## Examples
680680
@@ -762,7 +762,7 @@ defmodule String do
762762 @ doc """
763763 Returns a substring starting at the offset given by the first, and
764764 a length given by the second.
765- If the offset is greater than string length, than it returns nil.
765+ If the offset is greater than string length, than it returns ` nil` .
766766
767767 ## Examples
768768
@@ -827,8 +827,8 @@ defmodule String do
827827
828828 @ doc """
829829 Converts a string to an integer. If successful, returns a
830- tuple of form {integer, remainder of string}. If unsuccessful,
831- returns :error.
830+ tuple of the form ` {integer, remainder of string}` . If unsuccessful,
831+ returns ` :error` .
832832
833833 ## Examples
834834
@@ -852,9 +852,9 @@ defmodule String do
852852
853853 @ doc """
854854 Converts a string to a float. If successful, returns a
855- tuple of form {float, remainder of string}. If unsuccessful,
856- returns :error. If given an integer value, will return
857- same as to_integer/1.
855+ tuple of the form ` {float, remainder of string}` . If unsuccessful,
856+ returns ` :error` . If given an integer value, will return
857+ the same value as ` to_integer/1` .
858858
859859 ## Examples
860860
@@ -885,8 +885,8 @@ defmodule String do
885885 end
886886
887887 @ doc """
888- Returns true if `string` starts with any of the prefixes given, otherwise
889- false. `prefixes` can be either a single prefix or a list of prefixes.
888+ Returns ` true` if `string` starts with any of the prefixes given, otherwise
889+ ` false` . `prefixes` can be either a single prefix or a list of prefixes.
890890
891891 ## Examples
892892
@@ -921,8 +921,8 @@ defmodule String do
921921 end
922922
923923 @ doc """
924- Returns true if `string` ends with any of the suffixes given, otherwise
925- false. `suffixes` can be either a single suffix or a list of suffixes.
924+ Returns ` true` if `string` ends with any of the suffixes given, otherwise
925+ ` false` . `suffixes` can be either a single suffix or a list of suffixes.
926926
927927 ## Examples
928928
@@ -960,7 +960,7 @@ defmodule String do
960960 end
961961
962962 @ doc """
963- Returns true if `string` contains match, otherwise false.
963+ Returns ` true` if `string` contains match, otherwise ` false` .
964964 `matches` can be either a single string or a list of strings.
965965
966966 ## Examples
0 commit comments