cangjie-std-array

Guides Cangjie developers through Array<T> construction, access, modification, and operations.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to the Array<T> type in Cangjie, covering its construction, manipulation, and advanced operations, enabling efficient data handling.

Core Features & Use Cases

  • Array Construction: Learn various methods to create arrays, including literals, specified sizes, and initialization functions.
  • Element Access & Modification: Understand how to access, modify, and safely retrieve elements using indices and get.
  • Slicing & Splitting: Master techniques for extracting subarrays and dividing arrays into segments.
  • Concatenation & Repetition: Combine arrays or repeat their contents.
  • Copying & Filling: Create independent copies or fill arrays with specific values.
  • Searching & Sorting: Find elements, check for containment, and learn how to sort arrays using std.sort.
  • Mapping & Flattening: Transform array elements or flatten multi-dimensional arrays.
  • Use Case: When developing in Cangjie and needing to perform operations like creating a list of user IDs, accessing specific data points, or transforming a list of numbers into strings, this Skill will be your go-to reference.

Quick Start

Refer to the cangjie-std-array skill to understand how to create an array of integers with a size of 5, initialized with values from 0 to 4.

Frequently Asked Questions about cangjie-std-array

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

FAQPage Schema
How do I create and initialize an Array in Cangjie?

To create an Array in Cangjie, you can use array literals, specify a fixed size, or use an initialization function. This allows you to construct collections like a list of user IDs or a range of integers efficiently.

What is the best way to slice and split arrays in Cangjie?

The best way to slice and split arrays in Cangjie is by using the built-in slicing techniques to extract subarrays and splitting methods to divide arrays into manageable segments for targeted data processing.

How do I search for elements and sort an Array in Cangjie?

You can search for elements and check for containment using built-in Array methods, and sort arrays in Cangjie by utilizing the std.sort module to order your collection elements as needed.

Can I map and flatten multi-dimensional arrays in Cangjie?

Yes, you can map and flatten multi-dimensional arrays in Cangjie. The standard library Array type supports transforming elements through mapping and flattening nested array structures into a single-dimensional collection.

How do I concatenate, repeat, and copy arrays in Cangjie?

You can concatenate, repeat, and copy arrays in Cangjie using standard Array operations. These features allow you to combine multiple arrays, duplicate their contents, and create independent copies for safe manipulation.