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

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

    javascript - data.match(var) not working it seems -

    javascript - How can I pause a jQuery .each() loop, while waiting for user input? -