一键导入
string-handling
Working with ovx_string_t in C and C++. Use when user asks about printing, comparing, or converting ovx strings.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Working with ovx_string_t in C and C++. Use when user asks about printing, comparing, or converting ovx strings.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
High-level overview of a typical ovrtx application lifecycle. Use when user asks how to structure an ovrtx program, what the main steps are, or how the pieces fit together.
Asynchronous operation patterns including polling, timeouts, and non-blocking workflows. Use when user asks about async rendering, non-blocking operations, polling, timeouts, or parallel rendering.
Creating persistent attribute bindings for efficient repeated writes to the same prims and attribute. Use when user asks about persistent bindings, repeated writes, efficient animation loops, bind_attribute, or updating transforms every frame with caller-owned tensors. Use mapping-attributes when the hot path needs zero-copy direct writes into ovrtx buffers.
Binding materials to prims at runtime. Use when user asks to assign a material, change a material, set material binding, or swap materials on a prim.
Available camera render outputs for Real-Time Path-Tracing (RT2) mode. Use when user asks what AOVs/render vars are available, what format or dtype an output has, or how to read a specific output like depth, normals, albedo, or distance.
Cloning USD subtrees to create copies at new paths. Use when user asks to clone, duplicate, copy a prim, or create instances of existing geometry.
| name | string-handling |
| description | Working with ovx_string_t in C and C++. Use when user asks about printing, comparing, or converting ovx strings. |
| license | LicenseRef-NvidiaProprietary |
| version | 0.3.0 |
| author | NVIDIA ovrtx |
| tags | ["ovrtx","c","strings"] |
| tools | ["Read","Grep"] |
Use this skill when the user asks about printing, comparing, or converting ovx strings.
Resolve inputs in this order: existing repository files and referenced snippets, explicit user request, then broader agent context.
ovx_string_t: error text, returned path, dictionary lookup, status message, or user-provided string wrapper.std::string_view, copy to owning storage, or preserve lifetime.> **Source:** snippet before writing or explaining API usage.ovx_string_t.ptr and length; do not assume the string can be handled safely by APIs that only look for a null terminator.length before using strncmp.std::string_view when the caller only needs borrowed access, and copy immediately if the value must outlive the API-owned storage.This skill has no scripts.
All strings returned by the ovrtx API use ovx_string_t — a (ptr, length) pair. The strings are null-terminated, but prefer using the length field over relying on the null terminator.
Print with the %.*s precision pattern so the explicit length controls how many
characters are read from ptr.
Compare by checking length first, then using strncmp for the exact byte count.
Wrap ptr and length in std::string_view for zero-copy access to the
standard string API.
The error-handling helper in the minimal C example demonstrates this pattern:
Source:
examples/c/minimal/main.cppsnippetcheck-error-helper
| Type | Header |
|---|---|
ovx_string_t | include/ovx/types.h |
literal_to_ovx_string(str) | include/ovx/types.h — creates ovx_string_t from a string literal |
is_ovx_string_empty(str) | include/ovx/types.h — null/empty check |
ovx_string_t::ptr directly to functions that expect a specific length (e.g. strcmp) without also checking length. Use strncmp or std::string_view instead.ovrtx_get_last_error() are in thread-local storage and are invalidated by the next API call on the same thread. Copy or consume them immediately.> **Source:** directives in this skill to locate tested snippets before reusing API patterns.