---
title: std.convert
canonical_url: https://mew-lang.org/stdlib/convert/
sidecar_url: https://mew-lang.org/stdlib/convert.md
content_hash: sha256:6dd9e243f70d752216e8facb9f8ba4ddada5f5872c7fec2ad6614190cc89fb74
tokens: 190
uid: stdlib.convert
reading_time_minutes: 1
---

Standard Library
# std.convert

 
## Unions

 
    Union Description     ConvertError Why a string could not be converted to a number.    
## Functions

 
    Function Description     `atoi(value: string) -> Result<i32, ConvertError>` Converts the string to an `i32`.   `itoa(value: i32) -> string` Converts the number to a string.    
## `ConvertError`

 
    Case Description     `invalid` The string is not a number.   `overflow` The number is outside the range of an `i32`.    
    Member Description     `describe() -> string` Returns a description of the error.    
[Previous
                
                std.collections](https://mew-lang.org/stdlib/collections.md)[Next
                    
                std.io](https://mew-lang.org/stdlib/io.md)