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.