Jump to content
  • Advertisement
Sign in to follow this  

[.net] tokenise text file

This topic is 3981 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi Is there any way to tokenise a text file in C# like in Cpp :
std::string token;
ifstream stream;

...

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


Share this post


Link to post
Share on other sites
Advertisement
doh, I totally misread your question, sorry ;)

found these:
http://www.codeproject.com/csharp/StringTokenizer.asp
http://www.codeproject.com/useritems/SimpleStringTokenizer.asp

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!