Skip to content
Machine Learning
Skill

/string-handling

Working with ovx_string_t in C and C++. Use when user asks about printing, comparing, or converting ovx strings.

From plugin
ovrtx
27141 skills

Claude Code

$ npx -y skills add nvidia-omniverse/ovrtx --skill string-handling --agent claude-code

SKILL.md

string-handling.SKILL.md
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: CC-BY-4.0 AND Apache-2.0
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: CC-BY-4.0 AND Apache-2.0
author: NVIDIA ovrtx
tags:
  - ovrtx
  - c
  - strings
tools:
  - Read
  - Grep

String Handling

When to Use

Use this skill when the user asks about printing, comparing, or converting ovx strings.

Inputs

Resolve inputs in this order: existing repository files and referenced snippets, explicit user request, then broader agent context.

  • Target API surface: C, C++, or Python interop with C strings.
  • Source of the `ovx_string_t`: error text, returned path, dictionary lookup, status message, or user-provided string wrapper.
  • Required operation: print, compare, convert to `std::string_view`, copy to owning storage, or preserve lifetime.
  • Repository source snippets referenced below. Treat these snippets as the API source of truth.

Prerequisites

  • Use an ovrtx checkout that contains the referenced examples and docs tests.
  • Read the relevant `> **Source:**` snippet before writing or explaining API usage.
  • Know whether the string is API-owned borrowed storage or caller-owned storage before recommending a borrowed view or copy.

Instructions

1. Identify whether the task is printing, comparing, converting, or preserving an `ovx_string_t`. 2. Use both `ptr` and `length`; do not assume the string can be handled safely by APIs that only look for a null terminator. 3. In C, print with a precision-limited string format and compare by checking `length` before using `strncmp`. 4. In C++, prefer `std::string_view` when the caller only needs borrowed access, and copy immediately if the value must outlive the API-owned storage. 5. When changing code, run the C example or helper test that owns the referenced string-handling pattern whenever practical.

Output Format

  • For explanations, cite the relevant API names, source snippets, and caveats.
  • For code changes, summarize the files changed, snippets affected, and validation run.

Scripts

This skill has no scripts.

Limitations

  • The referenced snippets remain the source of truth; update or add tested snippets before documenting new API usage.

Overview

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.

C

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.

C++

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.cpp` snippet `check-error-helper`

Key Types / Functions

| 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 |

Troubleshooting

  • Do not pass `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.
  • Error strings from `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.

References

  • Use the `> **Source:**` directives in this skill to locate tested snippets before reusing API patterns.
  • Keep related skills, docs, and snippets synchronized when changing the workflow.
Read more
@nvidia-omniverse
Ships withovrtx

ovrtx is a C and Python library for embedding Omniverse RTX sensor simulation and visualization directly into applications.

Stars on GitHub

Momentum

stars in total
271
Star history of nvidia-omniverse/ovrtx on GitHub, a chart by star-history.com

Other skills on ovrtx.

application-flow

application-flow

High-level overview of a typical ovrtx application lifecycle. Use when user asks how to structure an ovrtx program, what the main…

async-operations

async-operations

Asynchronous operation patterns including polling, timeouts, and non-blocking workflows. Use when user asks about async…

attribute-bindings

attribute-bindings

Replacing persistent ovrtx attribute bindings with reusable ovstage queries for repeated writes or maps. Use when user asks about…

binding-materials

binding-materials

Binding materials to prims at runtime. Use when user asks to assign a material, change a material, set material binding, or swap…

camera-outputs-rt2

camera-outputs-rt2

Available camera render outputs for Real-Time Path Tracing (RT2) mode. Use when user asks what AOVs/render vars are available,…

cloning-prims

cloning-prims

Cloning USD subtrees to create copies at new paths. Use when user asks to clone, duplicate, copy a prim, or create instances of…

More skills from other plugins.

analyze-ci

analyze-ci

Analyze failed GitHub Action jobs. Takes one or more GitHub URLs (job, workflow-run, or PR) and summarizes each failure with root…

mlflow8d29k
@mlflow@mlflowInstall Skill
hf-cli

hf-cli

Hugging Face Hub CLI (`hf`) for downloading, uploading, and managing models, datasets, spaces, buckets, repos, papers, jobs, and…

skills3w11k
@huggingface@huggingfaceInstall Skill
feast-architecture

feast-architecture

Internals of the Feast codebase — how each component works, where the key abstractions live, and the data flow through the…

feast12d7.4k
@feast-dev@feast-devInstall Skill
add-ecosystem

add-ecosystem

Add a new ecosystem and base model to basemodel.constants.ts. Use when onboarding a new model family from providers like Baidu,…

civitai9d7.3k
@civitai@civitaiInstall Skill

Questions about string-handling.

Which coding agents can use string-handling?
string-handling installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.