You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: kata/7-kyu/i-before-e-except-after-c/README.md
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,19 @@ There's a common mnemonic given to those learning English spelling which goes:
6
6
7
7
> I before E except after C
8
8
9
-
This suggests that when you have the letters `i` and `e` next to each other in a word, the `i` should come first, with the exception that if preceding the two vowels is the letter `c` in which case the `e` should go first.
9
+
This suggests that when you have the letters `i` and `e` next to each other in a word, the `i` should come first, with the exception that if
10
+
preceding the two vowels is the letter `c` in which case the `e` should go first.
10
11
11
-
For example, this rule would tell you that the word for a close companion would be `"friend"` and not `"freind"`. For the `c` case, this means that when a package is mailed to you, you will `"receive"` it rather than `"recieve"` it.
12
+
For example, this rule would tell you that the word for a close companion would be `"friend"` and not `"freind"`. For the `c` case, this
13
+
means that when a package is mailed to you, you will `"receive"` it rather than `"recieve"` it.
12
14
13
-
However, besides being incorrect for many cases (my weird foreign scientist neighbor taught me a few examples), it's not clear from this rule what to do with more unusual cases with multiple `i`s and `e`s.
15
+
However, besides being incorrect for many cases (my weird foreign scientist neighbor taught me a few examples), it's not clear from this
16
+
rule what to do with more unusual cases with multiple `i`s and `e`s.
14
17
15
18
For the purposes of this kata our rule will be:
16
19
17
-
> For any contiguous sequence of `i` or `e` characters, all the `i`s should come before all the `e`s. If, however, the sequence is immediately preceeded by a `c`, all the `e`s should come before all the `i`s.
20
+
> For any contiguous sequence of `i` or `e` characters, all the `i`s should come before all the `e`s. If, however, the sequence is
21
+
> immediately preceded by a `c`, all the `e`s should come before all the `i`s.
18
22
19
23
## Task
20
24
@@ -34,4 +38,4 @@ You'll also need to account for the weirder cases that may not exist in real Eng
0 commit comments