天嵌 ARM开发社区

 找回密码
 注册
查看: 1740|回复: 1

关于qtopia 串口数据显示

[复制链接]
weivon 发表于 2012-8-16 19:06:08 | 显示全部楼层 |阅读模式
假如串口接收到的数据是:
aaabbbccc   

我只想显示后面三个字母
ccc
,代码应该怎样写???????求助~~~~~~~~~~~~

TQ_guoxixiao 发表于 2012-10-12 12:08:33 | 显示全部楼层
QString strSrc="aaabbbccc";
QString strDest=strSrc.mid(strSrc.length()-3,3);

赠人以鱼,不如赠人以渔。qtopia帮助文档
http://doc.qt.digia.com/qtopia2.2/html/qstring.html#mid
您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2024-9-30 10:57 , Processed in 1.033137 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表