MCPcopy Create free account
hub / github.com/baldurk/renderdoc / TruncateStringFromEnd

Function TruncateStringFromEnd

qrenderdoc/Code/QRDUtils.cpp:177–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177void TruncateStringFromEnd(QString &name)
178{
179 if(name.length() > 64)
180 {
181 QTextBoundaryFinder boundaries(QTextBoundaryFinder::Grapheme, name.data(), name.length());
182 boundaries.setPosition(64);
183 if(!boundaries.isAtBoundary())
184 boundaries.toPreviousBoundary();
185 int pos = boundaries.position();
186 name.resize(pos);
187 name += lit("...");
188 }
189}
190
191QString GetTruncatedResourceName(const ICaptureContext &ctx, ResourceId id)
192{

Callers 4

GetTruncatedResourceNameFunction · 0.85
setShaderStateMethod · 0.85
setShaderStateMethod · 0.85
setShaderStateMethod · 0.85

Calls 4

lengthMethod · 0.45
dataMethod · 0.45
positionMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected