当前位置:网站首页>C language array interception, C string by array interception method (c/s)
C language array interception, C string by array interception method (c/s)
2022-06-30 23:07:00 【Full stack programmer webmaster】
Hello everyone , I meet you again , I'm your friend, Quan Jun .
private void button1_Click(object sender, EventArgs e) {
string[] aa = this.GetYouhouComment(“aaa king ああああああddddd”, 4);
}
/// Metatext Columns
/// Truss number
/// obtain する It turns out
private string[] GetYouhouComment(string PValue, int PLenth) {
string[] result = new string[5];
string shiteiResult = PValue.Replace(“,”, string.Empty);
// Text columns へ Content を Replacement management を That's ok う.
int byteCount = Encoding.GetEncoding(932).GetByteCount(shiteiResult);
int j = 0;
// Appoint する Truss number >= Text columns の Truss number の Occasion
if (PLenth >= byteCount) {
shiteiResult = string.Empty.PadRight(PLenth – byteCount) + shiteiResult;
result[j] = shiteiResult;
// outside の Occasion
} else {
string strValue = string.Empty;
string strCompare = string.Empty;
// Appoint する Truss number な Text columns を obtain する.
for (int i = 0; i < shiteiResult.Length; i++) {
strCompare = shiteiResult.Substring(i, 1);
// GetEncodingメソッドの Arguments ’932’がSJISを in します.
if (Encoding.GetEncoding(932).GetByteCount(strValue) +
Encoding.GetEncoding(932).GetByteCount(strCompare) > PLenth) {
if (j < 5) {
result[j] = strValue;
strValue = strCompare;
j = j + 1;
} else {
break;
}
} else {
strValue = strValue + shiteiResult.Substring(i, 1);
if (i == shiteiResult.Length – 1) {
result[j] = strValue;
}
}
}
}
return result; }
Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/132229.html Link to the original text :https://javaforall.cn
边栏推荐
- 机器学习编译入门课程学习笔记第二讲 张量程序抽象
- 【Android,Kotlin,TFLite】移动设备集成深度学习轻模型TFlite(物体检测篇)
- The superficial understanding of the industrial Internet finally brought the development of the industrial Internet into the strange circle of the consumer Internet
- latex左侧大括号 latex中大括号多行公式
- 基金客户和销售机构
- RIDE:获取图片base64
- 请指教同花顺软件究竟是什么?另外想问,现在在线开户安全么?
- QQmlApplicationEngine failed to load component qrc:/main. qml:-1 No such file or directory
- Introduction to digital transformation solutions for enterprises going to sea
- CNN classic network model details -lenet-5 (pytorch Implementation)
猜你喜欢

How to design test cases
![[Android, kotlin, tflite] mobile device integration deep learning light model tflite (object detection)](/img/7e/3e6ebfb90a82249d934296a041ba21.png)
[Android, kotlin, tflite] mobile device integration deep learning light model tflite (object detection)

Solution to the conflict between unique index and logical deletion

Doker's container data volume

项目管理到底管的是什么?

Jmeter跨线程参数关联无需脚本

【Android,Kotlin,TFLite】移动设备集成深度学习轻模型TFlite(物体检测篇)

During telecommuting, the project team punched in the wechat group | solicited papers from the community

零样本和少样本学习

JMeter cross thread parameter association requires no script
随机推荐
手机上怎么开股票账户?另外,手机开户安全么?
Fund sales code of conduct and information management
公有云市场迈入深水区,冷静的亚马逊云还坐得住吗?
How to open a stock account? Is it safe to open a mobile account
MIT博士论文 | 优化理论与机器学习实践
Apache server OpenSSL upgrade
后疫情时代,云计算如何为在线教育保驾护航
Solve arm_ release_ ver of this libmali is ‘g2p0-01eac0‘,rk_ so_ Ver is' 4 ', libgl1 mesa dev will not be installed, and there are unsatisfied dependencies
KVM IO performance test data
如何使用 DataAnt 监控 Apache APISIX
How to develop the exchange system? Mature technology case of digital currency exchange system development
leetcode:104. Maximum depth of binary tree
Strictly minor spanning tree
Redis - 01 缓存:如何利用读缓存提高系统性能?
Fastjson V2 simple user manual
flutter - sort List排序
As the public cloud market enters the deep water, can the calm Amazon cloud still sit still?
Based on the open source stream batch integrated data synchronization engine Chunjun data restore DDL parsing module actual combat sharing
What is flush software? In addition, is it safe to open an account online now?
35家巨头科技公司联合组成元宇宙标准论坛组织