I don't have much code to show because it does not directly relate to a code issue, but I am having trouble parsing text in C++ and I need help. I am unable to find a solution elsewhere.
I have a KML file at this link.
Inside of that is text that was generated from the US National Weather Service. The text is the following text :
Shower activity associated with a tropical wave over the easternCaribbean Sea remains disorganized. This system is expected to movewest-northwestward with no significant development, producinglocally heavy rainfall over Puerto Rico, Hispaniola, and portions ofthe southeastern Bahamas during the next few days. Over the weekend,conditions could become marginally conducive for development whenthe disturbance moves near Florida and the central and northwesternBahamas.
I am still a novice programmer and I am having trouble with this text. Notice words like andthunderstorms are placed together. In my attempt to parse this text and place a space between the words, I looked for escape sequences that would be causing this, first being "\n". This did not work.
I can't find any way to separate these words.
I decided to see if the words were actually placed together or not by using this code to find it and return something other than zero :
int findWord = KML.find("andthunderstorms");
This returns a positive value, so this leads me to believe that there is no weird formatting causing this... and the text just is delivered that way. The problem is that I don't see that being true, it does not make sense for a large organization to send out weather data improperly formatted. In addition to that, I am doing a project in Mapbox using this text and it does not display the text at all as it is. This usually happens if there is an escape sequence it does not like - it won't load anything. This is why I believe it has something to do with the text itself.
How can I find out what is causing this? I am not asking anyone to write code for me, I just need a place to start.
exactly at the problem points. To save myself the hassle of programming beyond my capacity, I am working on extracting the descriptions from there. I am curious about the sort of data you work with now- I am also in TX. – David Jul 31 '19 at 08:23