首页
Tom Utilities

语义化版本比较器

开发者实用工具

比较两个语义化版本,判断哪个更新,包括 alpha、beta 等预发布标签。

使用方法

Comparing versions

Versions follow the major.minor.patch format. Build metadata after a plus sign is ignored, while a pre-release tag such as -beta.1 sorts before the same version without one.

  1. Enter two versions.
  2. Read which one is greater.
  3. A leading v prefix is accepted.

常见问题

Which is greater, 1.0.0 or 1.0.0-rc.1?

1.0.0 is greater. A pre-release tag always sorts before the corresponding normal version.

Is a v prefix allowed?

Yes, a leading v is ignored before comparison.