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