rust - Check if a string is empty or blank -


what is the correct way to check whether a string is empty or not) & amp; Str b) string? I used to do it with "aaa" .len () == 0 , but do I want another way as my stomach?

both and str and string

  • is_empty ".is_empty (), true); assert_eq! (" ".to_string () .is_empty (), true); / Code>

    Comments

    Popular posts from this blog

    mysql - How to enter php data into a html multiple select box -

    java - Can't add JTree to JPanel of a JInternalFrame -

    c++ - Cassandra datastax cpp driver - avoiding unnecessary copies -