Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7d9d2d1

Browse files
Merge pull request youngyangyang04#1372 from Jerry-306/patch-53
纠正 0093.复制IP地址 JavaScript 版本代码
2 parents 42970cc + ab6693d commit 7d9d2d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎problems/0093.复原IP地址.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ var restoreIpAddresses = function(s) {
444444
return;
445445
}
446446
for(let j = i; j < s.length; j++) {
447-
const str = s.substr(i, j- i + 1);
447+
const str = s.slice(i, j + 1);
448448
if(str.length > 3 || +str > 255) break;
449449
if(str.length > 1 && str[0] === "0") break;
450450
path.push(str);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /