// GENERATED — DO NOT EDIT
///|
#borrow(str, stretch)
extern "c" fn moonbit_pango_parse_stretch(
str : Bytes,
stretch : Ref[Stretch],
warn : Bool,
) -> Bool = "moonbit_pango_parse_stretch"
///|
/// [Upstream documentation](https://gnome.pages.gitlab.gnome.org/pango/Pango/func.parse_stretch.html).
pub fn parse_stretch(str : String, warn : Bool) -> Stretch? {
let stretch = Ref(Stretch::UltraCondensed)
let result = moonbit_pango_parse_stretch(
@encoding/utf8.encode(str),
stretch,
warn,
)
if result {
Some(stretch.val)
} else {
None
}
}