Travis build: 159
This commit is contained in:
22
README.md
22
README.md
@ -123,6 +123,7 @@
|
|||||||
* [`kebab`](#kebab)
|
* [`kebab`](#kebab)
|
||||||
* [`n_times_string`](#n_times_string)
|
* [`n_times_string`](#n_times_string)
|
||||||
* [`palindrome`](#palindrome)
|
* [`palindrome`](#palindrome)
|
||||||
|
* [`reverse_string`](#reverse_string)
|
||||||
* [`snake`](#snake)
|
* [`snake`](#snake)
|
||||||
* [`split_lines`](#split_lines)
|
* [`split_lines`](#split_lines)
|
||||||
|
|
||||||
@ -1929,6 +1930,27 @@ palindrome('taco cat') # True
|
|||||||
|
|
||||||
<br>[⬆ Back to top](#contents)
|
<br>[⬆ Back to top](#contents)
|
||||||
|
|
||||||
|
### reverse_string
|
||||||
|
|
||||||
|
Returns the reverse of a string.
|
||||||
|
|
||||||
|
Use string slicing to reverse the string.
|
||||||
|
|
||||||
|
```py
|
||||||
|
def reverse_string(string):
|
||||||
|
return string[::-1]
|
||||||
|
```
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Examples</summary>
|
||||||
|
|
||||||
|
```py
|
||||||
|
reverse_string("snippet") #"teppins"
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<br>[⬆ Back to top](#contents)
|
||||||
|
|
||||||
### snake
|
### snake
|
||||||
|
|
||||||
Converts a string to snake case.
|
Converts a string to snake case.
|
||||||
|
|||||||
@ -928,6 +928,21 @@
|
|||||||
"hash": "c3008a44f2eb31adaca3e4f91c29a56a955e3105f9c187aa055fc55c35874b41"
|
"hash": "c3008a44f2eb31adaca3e4f91c29a56a955e3105f9c187aa055fc55c35874b41"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "reverse_string",
|
||||||
|
"type": "snippetListing",
|
||||||
|
"title": "reverse_string",
|
||||||
|
"attributes": {
|
||||||
|
"text": "Returns the reverse of a string.\n\nUse string slicing to reverse the string.\n\n",
|
||||||
|
"tags": [
|
||||||
|
"string",
|
||||||
|
"beginner"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"hash": "530fb0bc1bfaf1b56910aee3137be644986727e2f15b7e7ac2010f8797d86258"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "sample",
|
"id": "sample",
|
||||||
"type": "snippetListing",
|
"type": "snippetListing",
|
||||||
|
|||||||
@ -1228,6 +1228,26 @@
|
|||||||
"hash": "c3008a44f2eb31adaca3e4f91c29a56a955e3105f9c187aa055fc55c35874b41"
|
"hash": "c3008a44f2eb31adaca3e4f91c29a56a955e3105f9c187aa055fc55c35874b41"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"id": "reverse_string",
|
||||||
|
"title": "reverse_string",
|
||||||
|
"type": "snippet",
|
||||||
|
"attributes": {
|
||||||
|
"fileName": "reverse_string.md",
|
||||||
|
"text": "Returns the reverse of a string.\n\nUse string slicing to reverse the string.\n\n",
|
||||||
|
"codeBlocks": {
|
||||||
|
"code": "def reverse_string(string):\n return string[::-1]",
|
||||||
|
"example": "reverse_string(\"snippet\") #\"teppins\""
|
||||||
|
},
|
||||||
|
"tags": [
|
||||||
|
"string",
|
||||||
|
"beginner"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"meta": {
|
||||||
|
"hash": "530fb0bc1bfaf1b56910aee3137be644986727e2f15b7e7ac2010f8797d86258"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"id": "sample",
|
"id": "sample",
|
||||||
"title": "sample",
|
"title": "sample",
|
||||||
|
|||||||
Reference in New Issue
Block a user