MCPcopy Create free account
hub / github.com/apache/arrow-rs / cast_single_string_to_boolean_default

Function cast_single_string_to_boolean_default

arrow-cast/src/cast/string.rs:430–434  ·  view source on GitHub ↗

Cast a single string to boolean with default cast option(safe=true).

(value: &str)

Source from the content-addressed store, hash-verified

428
429/// Cast a single string to boolean with default cast option(safe=true).
430pub fn cast_single_string_to_boolean_default(value: &str) -> Option<bool> {
431 cast_single_string_to_boolean(value, &CastOptions::default())
432 .ok()
433 .flatten()
434}
435
436pub(crate) fn cast_utf8_to_boolean<OffsetSize>(
437 from: &dyn Array,

Callers 1

as_booleanMethod · 0.85

Calls 3

defaultFunction · 0.85
flattenMethod · 0.80

Tested by

no test coverage detected