add: 左旋转字符串
This commit is contained in:
8
src/string/zuo-xuan-zhuan-zi-fu-chuan-lcof.js
Normal file
8
src/string/zuo-xuan-zhuan-zi-fu-chuan-lcof.js
Normal file
@ -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