From: TimePath Date: Sun, 8 Apr 2018 03:55:39 +0000 (+1000) Subject: Add string logic table X-Git-Tag: xonotic-v0.8.5~2197 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=94e238ca164301485d7935e8b84aaabe8aa8653a;p=xonotic%2Fxonotic-data.pk3dir.git Add string logic table --- diff --git a/qcsrc/lib/string.qh b/qcsrc/lib/string.qh index d79552187..7142f334c 100644 --- a/qcsrc/lib/string.qh +++ b/qcsrc/lib/string.qh @@ -4,6 +4,25 @@ #include "sort.qh" #include "oo.qh" +// string logic +// +// true: is truthy +// == "": is equal to "" +// is "": has the same string index as the string constant "" +// strunzone: can be strunzoned +// +// | | true | == "" | is "" | strunzone | +// | :----------: | :--: | :---: | :---: | :-------: | +// | nil | | yes | | | +// | strcat(nil) | yes | yes | | | +// | strzone(nil) | yes | yes | | yes | +// | "" | yes | yes | yes | | +// | strcat("") | yes | yes | | | +// | strzone("") | yes | yes | | yes | +// | "s" | yes | | | | +// | strcat("s") | yes | | | | +// | strzone("s") | yes | | | yes | + #ifdef CSQC float stringwidth_colors(string s, vector theSize) {