Thông báo: Tất cả dự án phi thương mại đã đăng ký sử dụng Earth Engine trước ngày 15 tháng 4 năm 2025 phải xác minh điều kiện sử dụng phi thương mại để duy trì quyền truy cập vào Earth Engine.
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Chuyển đổi một chuỗi thành một số.
Cách sử dụng
Giá trị trả về
ee.Number.parse(input, radix)
Số
Đối số
Loại
Thông tin chi tiết
input
Chuỗi
Chuỗi cần chuyển đổi thành một số.
radix
Số nguyên, mặc định: 10
Một số nguyên đại diện cho hệ thống số cơ sở mà bạn muốn chuyển đổi. Nếu đầu vào không phải là số nguyên, thì cơ số phải bằng 10 hoặc không được chỉ định.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-26 UTC."],[[["`ee.Number.parse()` converts a string to an Earth Engine Number object."],["The function accepts an optional `radix` argument for specifying the base of the number system (default is 10)."],["Leading zeros in the input string are automatically removed during conversion."],["The function can handle various input types like client-side strings, Earth Engine Strings, and values retrieved from Earth Engine features."]]],["`ee.Number.parse()` converts a string to a number. It accepts a string `input` and an optional `radix` (default 10), representing the base of the number system. If the input isn't an integer, radix must be 10 or unspecified. Leading zeros are removed during conversion. The examples show parsing client-side strings, `ee.String` objects, and ambiguous objects, both in JavaScript and Python. Base 16 conversions using radix are also shown.\n"]]