# truthy
[](https://crates.io/crates/truthy)
[](https://docs.rs/truthy)
Check if a value is "truthy"
## Example
```rust
let choice: String = get_user_input();
// `choice` is the original choice if it's truthy (non-empty string), or the default
// choice if it's falsy (empty string).
let choice = choice.or(String::from("default choice"));
// Decrements n by 1 if n > 0;
let mut n = get_u8();
## Behavior
```rust
// non-zero numbers are truthy
0u32.truthy(); // false
0f32.truthy(); // false
1u32.truthy(); // true
1f32.truthy(); // true
// empty strings are not truthy
"".truthy(); // false
"foo".truthy(); // true
```