///|
fn String::json_string(self : String) -> String {
"\"" +
self
.replace_all(old="\\", new="\\\\")
.replace_all(old="\"", new="\\\"")
.replace_all(old="\n", new="\\n")
.replace_all(old="\r", new="\\r")
.replace_all(old="\t", new="\\t") +
"\""
}
///|
fn Bool::json_bool(self : Bool) -> String {
if self {
"true"
} else {
"false"
}
}
///|
fn TitleBarStyle::manifest_name(self : TitleBarStyle) -> String {
match self {
Native => "native"
Transparent => "transparent"
Hidden => "hidden"
}
}