A

Admin • 833.24K Points
Coach

Q. Which function would you use to convert a string to an integer?

  • (A) str::as_i32()
  • (B) parse::<i32>()
  • (C) int::from_str()
  • (D) to_i32()
  • Correct Answer - Option(B)
  • Views: 23
  • Filed under category Rust
  • Hashtags:

Explanation by: Admin

`parse::<i32>()` is used to convert a string into an integer.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.