Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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   "
 
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   "
Posted 15-Oct-12 23:26pm
Comments
Marius Bancila at 16-Oct-12 7:39am
   
Is this data provided as text or binary? Because that Ì could be some actual data incorrectly displayed as a character, even if it is not intended so.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You could use std::find/[^] to locate occurences of 'Ì', and then remove it with an appropriate function: if the data type is std::string, then use string::erase[^], otherwise use a simple loop to shift the rest of the string one position to the left.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 6,045
1 DamithSL 4,601
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,310


Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 16 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100