-
Notifications
You must be signed in to change notification settings - Fork 524
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
移除了 `hasNegativeSign` 变量及其相关逻辑,简化了代码。 修改了负号 `-` 的处理逻辑,现在如果负号出现在非开头位置,函数将返回 0。 更新了字符检查逻辑,确保负号 `-` 也被视为有效字符。 移除了在没有有效数字时返回 0 的逻辑,使函数返回值更加直接。
- Loading branch information
猿人易
committed
Sep 19, 2024
1 parent
937efb7
commit fcdfa9b
Showing
1 changed file
with
3 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters