天软金融分析.NET函数大全 > TSL函数 > 基础函数 > 字符串 > 多语言支持函数

CharToByteIndex    

简述

字符索引到字节索引的转换。
定义
CharToByteIndex(const S: string; Index: Integer): Integer;
参数
名称类型说明
S string字符串,源串
Index Integer整数,字符位置
返回 Integer
整数,字符位置对应的字节位置
  • 范例


    //返回第30字符对应的字节位置
    //其中‘天软’占有4个字节,其余每个字符占1个字节
    S:= "天软Tinysoft Statistical analysis Language";
    return CharToByteIndex(s,30);
    //返回:32
相关