add: 左旋转字符串
This commit is contained in:
1 parent
3b8d9b3f40
commit
c027a13f6e
4 files changed
+26
-1
No files matched your search
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* @param {string} s
|
||||
* @param {number} n
|
||||
* @return {string}
|
||||
*/
|
||||
export const reverseLeftWords = function (s, n) {
|
||||
return (s + s).substr(n, s.length)
|
||||
}
|
||||
Reference in new issue
Block a user