基本操作之——字符截取操作
*字符截取操作
String1 := 'abcdefghij'
String2 := '0123456'
Message := '字符截取操作'
Message[1] := 'String1 := \'abcdefghij\''
Message[2] := 'String2 := \'0123456\''
dev_clear_window()
dev_disp_text(Message, 'window', 0, 0, 'white', 'box_color', '#00ffff4c')
tuple_substr (String1, 3, 5, SingleSubstring1)
dev_disp_text('tuple_substr (String1, 3, 5, SingleSubstring1)执行结果为'+SingleSubstring1, 'window', 50, 0, 'white', 'box_color', '#00ffff4c')
SingleSubstring2 := String1{3:5}
dev_disp_text('SingleSubstring2 := String1{3:5}执行结果为'+SingleSubstring2, 'window', 70, 0, 'white', 'box_color', '#00ffff4c')
tuple_substr (String1, [1,2,3], [3,6,3], MultipleIndices1)
SingleSubstring2 := String1{3:5}
dev_disp_text('tuple_substr (String1, [1,2,3], [3,6,3], MultipleIndices1)执行结果为'+MultipleIndices1, 'window', 90, 0, 'white', 'box_color', '#00ffff4c')
MultipleIndices2 := String1{[1,2,3]:[3,6,3]}
dev_disp_text('MultipleIndices2 := String1{[1,2,3]:[3,6,3]}执行结果为'+MultipleIndices2, 'window', 150, 0, 'white', 'box_color', '#00ffff4c')
tuple_substr ([String1,String2], 3, 5, MultipleInputStrings1)
dev_disp_text('tuple_substr ([String1,String2], 3, 5, MultipleInputStrings1)执行结果为'+MultipleInputStrings1, 'window', 210, 0, 'white', 'box_color', '#00ffff4c')
MultipleInputStrings2 := [String1,String2]{3:5}
dev_disp_text('MultipleInputStrings2 := [String1,String2]{3:5}执行结果为'+MultipleInputStrings2, 'window', 250, 0, 'white', 'box_color', '#00ffff4c')
tuple_substr ([String1,String2], [5,0], [8,1], MultipleInputStringsAndIndices1)
dev_disp_text('tuple_substr ([String1,String2], [5,0], [8,1], MultipleInputStringsAndIndices1)执行结果为'+MultipleInputStringsAndIndices1, 'window', 310, 0, 'white', 'box_color', '#00ffff4c')
MultipleInputStringsAndIndices2 := [String1,String2]{[5,0]:[8,1]}
dev_disp_text('MultipleInputStringsAndIndices2 := [String1,String2]{[5,0]:[8,1]}执行结果为'+MultipleInputStringsAndIndices2, 'window', 350, 0, 'white', 'box_color', '#00ffff4c')
tuple_substr ([String1,String2], 1, 0, EmptySubstring1)
dev_disp_text('tuple_substr ([String1,String2], 1, 0, EmptySubstring1)执行结果为'+EmptySubstring1, 'window', 390, 0, 'white', 'box_color', '#00ffff4c')
EmptySubstring2 := [String1,String2]{1:0}
dev_disp_text('EmptySubstring2 := [String1,String2]{1:0}执行结果为'+EmptySubstring2, 'window', 430, 0, 'white', 'box_color', '#00ffff4c')
------------------------------------
承接
**视觉检测软件开发及调试
**工业软件开发
**上位机软件开发
wechat:luoran2024
qq:565934058
email:taoyuansu@qq.com
海量教育资源及影视资源下载
微信公众号:EFun科技
------------------------------------
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 单线程的Redis速度为什么快?
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 展开说说关于C#中ORM框架的用法!