MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / ShortExpress

Function ShortExpress

engine/Poseidon/UI/Map/UIMapExt.cpp:1680–1694  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1678}
1679
1680static RString ShortExpress(RString ex)
1681{
1682 if (ex.GetLength() < 32)
1683 {
1684 return ex;
1685 }
1686 // try to shorten it in some reasonable way first
1687 RString shortEx = ex.Substring(0, 29);
1688 int cp;
1689 if ((cp = CharRPos(shortEx, ';')) > 22)
1690 {
1691 return ex.Substring(0, cp + 1) + RString("...");
1692 }
1693 return ex.Substring(0, 26) + RString("...");
1694}
1695
1696static RString CatWords(RString cond, RString cond2)
1697{

Callers 1

DrawLabelMethod · 0.85

Calls 4

CharRPosFunction · 0.85
SubstringMethod · 0.80
RStringClass · 0.50
GetLengthMethod · 0.45

Tested by

no test coverage detected