Skip to main content
GameDev.net gamedev.net
🔒 Locked

[.net] tokenise text file

Started by iliak Jun 24, 2007 at 7:35 AM 5 replies 1.2k views
Original Post
iliak
iliak
Hi Is there any way to tokenise a text file in C# like in Cpp :

std::string token;
ifstream stream;

...

	while (token != "}")
	{
		stream >> token;
		...
	}


- Iliak -
[ ArcEngine: An open source .Net gaming framework ]
[ Dungeon Eye: An open source remake of Eye of the Beholder II ]
_swx_
_swx_
http://www.boost.org/libs/tokenizer/index.html
iliak
iliak
Boost is for Cpp and what I want is for my C# project.
- Iliak -
[ ArcEngine: An open source .Net gaming framework ]
[ Dungeon Eye: An open source remake of Eye of the Beholder II ]
_swx_
_swx_
doh, I totally misread your question, sorry ;)

found these:
http://www.codeproject.com/csharp/StringTokenizer.asp
http://www.codeproject.com/useritems/SimpleStringTokenizer.asp
iliak
iliak
ok, thanks :)
- Iliak -
[ ArcEngine: An open source .Net gaming framework ]
[ Dungeon Eye: An open source remake of Eye of the Beholder II ]
savagemonitor
savagemonitor
In C# there is a method called Split (carried by all strings) that takes a character array as input and returns an array of all the sub-strings separated by those characters in the array.
iliak
iliak
ok

Thanks
- Iliak -
[ ArcEngine: An open source .Net gaming framework ]
[ Dungeon Eye: An open source remake of Eye of the Beholder II ]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.