Home » U++ Library support » U++ Core » GetCsvLine (Reading CSVfile)
Re: GetCsvLine [message #49988 is a reply to message #49987] |
Tue, 12 June 2018 14:21 |
Oblivion
Messages: 1093 Registered: August 2007
|
Senior Contributor |
|
|
Hello Upp User,
#include <Core/Core.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
const String csvstr = "data1,data2,data3;data4,data5,data6;data7,data8,data9";
StringStream ss(csvstr); // Any Stream derivative will also do (e.g. FileIn)
auto v = GetCsvLine(ss, ';', CHARSET_DEFAULT);
for(auto e : v)
Cout() << e << '\n';
}
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Tue, 12 June 2018 14:30] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sat May 04 00:58:08 CEST 2024
Total time taken to generate the page: 0.01907 seconds
|