删除“Ì"的逻辑应该是什么?
问题描述:
我正在得到一个像这样的值:
I am getting a value like this:
"RE000022000500200Ì 0.00 0.1 0.129.8#####- 97- 2#####- 1##### 960.504.00 0: 00.000.00 8: 013:52 0: 021:52############2.00.0 "
在对上述数据进行了一些处理之后,我想要这样的值吗?请您删除"to"的逻辑应该是什么?
I want a value like this after doing some processing on above data can you You please what should be the logic to remove "Ì"
0x0043d690 "RE000022000500200 0.00 0.1 0.129.8#####- 97- 2#####- 1##### 960.504.00 0: 00.000.00 8: 013:52 0: 021:52############2.00.0 "
答
您可以使用std::find/ [ ^ ]定位''Ì''
的出现,然后使用适当的功能将其删除:如果数据类型为std::string
,则使用string::erase [
You could use std::find/[^] to locate occurences of''Ì''
, and then remove it with an appropriate function: if the data type isstd::string
, then use string::erase[^], otherwise use a simple loop to shift the rest of the string one position to the left.
您已经拥有所有必需的信息来处理您发布到 ^ ].您确实应该通过选择呈现数据的结构中的不同字段来处理此问题,而不是尝试将其处理为简单的字符串.
You already have all the required information to process this data which you posted into your question on StackOverflow[^]. You really should be processing this by selecting the different fields in the structure that the data is presented in, rather than trying to process it as a simple string of characters.