зеркало из https://github.com/golang/example.git
Update Reverse comment
Change-Id: I6e435391fc5d1d67af96ea88dcce3ccdd204d146
This commit is contained in:
Родитель
f3cf0f452b
Коммит
ec2c99bcdd
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
// Package stringutil contains utility functions for working with strings.
|
||||
package stringutil
|
||||
|
||||
// Reverse returns the provided string with its runes in reverse order.
|
||||
// Reverse returns its argument string reversed rune-wise left to right.
|
||||
func Reverse(s string) string {
|
||||
r := []rune(s)
|
||||
for i, j := 0, len(r)-1; i < len(r)/2; i, j = i+1, j-1 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче