|
Haio 0.2.X
Homebrew Asset IO/CDN
|
Functions | |
| int | getInt (std::string_view value) |
| Size | getSize (std::string_view value) |
| int | getPercent (std::string_view value) |
| Rect | getRect (std::string_view value) |
| bool | tryGetSize (std::string_view value, Size &out) |
| bool | tryGetRect (std::string_view value, Rect &out) |
| bool | tryGetCropGeometry (std::string_view value, Rect &out) |
| int Haio::String::getInt | ( | std::string_view | value | ) |
| int Haio::String::getPercent | ( | std::string_view | value | ) |
a size written as a share of what came in: "30%", or "30pct" where a percent sign cannot go.
the url form exists because "%" opens an escape sequence: "?resize=30%" is not a request for thirty percent, it is a request the server has to reject as a broken escape. "pct" says the same thing and survives being a url.
it answers zero when the text is not a share at all, since zero percent of a picture is nothing and could never have been meant.
Definition at line 52 of file string.cpp.

| Rect Haio::String::getRect | ( | std::string_view | value | ) |
| Size Haio::String::getSize | ( | std::string_view | value | ) |
| bool Haio::String::tryGetCropGeometry | ( | std::string_view | value, |
| Rect & | out ) |
| bool Haio::String::tryGetRect | ( | std::string_view | value, |
| Rect & | out ) |
| bool Haio::String::tryGetSize | ( | std::string_view | value, |
| Size & | out ) |