cangjie-std-convert

Parse strings into primitive types and convert integers between radix bases in Cangjie.

2|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/zhenzhizhi12/NexusAgent --skill cangjie-std-convert-zhenzhizhi12
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cangjie-std-convert
Source: https://github.com/zhenzhizhi12/NexusAgent/tree/main/.opencode/skills/common-skill-l1/convert
Command: npx skills add https://github.com/zhenzhizhi12/NexusAgent --skill cangjie-std-convert-zhenzhizhi12

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies the process of converting data between different types in Cangjie, such as parsing strings into integers or floats, and converting numbers between various bases (like hexadecimal or binary).

Core Features & Use Cases

  • String Parsing: Safely parse strings into primitive types like Int64, Float64, and Bool using parse or tryParse.
  • Radix Conversion: Convert integers to and from different number bases (2-36) using RadixConvertible.
  • Use Case: When receiving user input as a string, use Int64.tryParse to safely convert it to an integer for further calculations, handling invalid inputs gracefully.

Quick Start

Use the cangjie-std-convert skill to parse the string "12345" into an Int64.

Frequently Asked Questions about cangjie-std-convert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I parse a string to an integer in Cangjie?

To parse a string to an integer in Cangjie, use the `parse` function for direct conversion or `tryParse` for safe parsing. `tryParse` gracefully handles invalid inputs by avoiding runtime errors during the type conversion.

Does Cangjie support converting integers between different number bases?

Cangjie supports converting integers between different number bases using the `RadixConvertible` utility. It enables converting integers to and from various number bases ranging from 2 to 36, including hexadecimal and binary representations.

What is the best way to safely handle invalid user input during type conversion in Cangjie?

The best way to handle invalid user input during type conversion in Cangjie is using `tryParse`. It safely attempts to parse strings into primitive types like `Int64`, `Float64`, and `Bool` without crashing on malformed data.

Can I convert a string to a boolean or float using Cangjie?

You can convert a string to a boolean or float in Cangjie using the provided parsing utilities. The Skill facilitates parsing strings into primitive types including `Float64` and `Bool` alongside `Int64` using `parse` or `tryParse`.

When do I need to specify a radix for string parsing in Cangjie?

You need to specify a radix for string parsing in Cangjie when converting numbers between non-decimal bases. Use `RadixConvertible` to parse or generate string representations of integers with a specified radix from 2 to 36.