* Encode a string with no parameters into an encoded string, if the string id is valid. * @note the return encoded string will be empty if the string id is not valid. * @param str String to encode. * @returns an EncodedString. */
| 132 | * @returns an EncodedString. |
| 133 | */ |
| 134 | static inline EncodedString GetEncodedStringIfValid(StringID str) |
| 135 | { |
| 136 | if (str == INVALID_STRING_ID) return {}; |
| 137 | return GetEncodedString(str); |
| 138 | } |
| 139 | |
| 140 | /** |
| 141 | * Get an encoded string with parameters. |
no test coverage detected