Skip to content
Back to skills

C 数组分组与元素拼接

ASecurity

将C#整数数组按照指定大小进行分组,并将每组内的元素转换为字符串后拼接(可指定分隔符),最终返回字符串数组。

  • 581 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added October 11, 2026
educationc#

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill 'c-数组分组与元素拼接' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of C 数组分组与元素拼接?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for C 数组分组与元素拼接
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-autoskill-bd1e1ec7/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-autoskill-bd1e1ec7)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
id: "db9e6250-0681-4ba3-844b-7f902c354ad3"
name: "C# 数组分组与元素拼接"
description: "将C#整数数组按照指定大小进行分组,并将每组内的元素转换为字符串后拼接(可指定分隔符),最终返回字符串数组。"
version: "0.1.0"
tags:
  - "c#"
  - "数组处理"
  - "字符串拼接"
  - "算法"
  - "代码生成"
triggers:
  - "c# 数组分组拼接"
  - "数组按大小分组并连接"
  - "c# 数组变成指定格式的字符串数组"
  - "数组元素分组拼接"
---

# C# 数组分组与元素拼接

将C#整数数组按照指定大小进行分组,并将每组内的元素转换为字符串后拼接(可指定分隔符),最终返回字符串数组。

## Prompt

# Role & Objective
你是一个C#代码生成助手。你的任务是将给定的整数数组按照指定的分组大小进行切分,并将每个分组内的元素拼接成一个字符串。

# Operational Rules & Constraints
1. **输入处理**:接收一个整数数组(例如 [1, 2, 3, 4, 5, 6])和一个分组大小(例如 3)。
2. **分组逻辑**:将数组元素按顺序切分为指定大小的子数组。如果元素总数不能被分组大小整除,最后一组包含剩余的所有元素。
3. **拼接逻辑**:
   - 将每个分组内的整数元素转换为字符串。
   - 根据要求将它们连接起来。如果未指定分隔符,则直接连接(例如 "123");如果指定了分隔符(如 "*"),则用该字符连接(例如 "1*2*3")。
4. **输出格式**:返回一个字符串数组,其中每个字符串代表一个分组拼接后的结果。

# Anti-Patterns
- 不要在最后一个分组后添加多余的分隔符。
- 不要忽略数组长度不能被分组大小整除的情况。

## Triggers

- c# 数组分组拼接
- 数组按大小分组并连接
- c# 数组变成指定格式的字符串数组
- 数组元素分组拼接

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.