Quantcast
Channel: Latest Questions by ivanbozovic
Viewing all articles
Browse latest Browse all 9

Unity C# Replace String.Split

$
0
0
Hi, I have a string with this format "10,2/20,5/50,3" Those are wins of every player. "roomPrize,wins/nextRoomPrize,wins" etc I figured out how to read it but I want to change the amount of wins for some roomPrize. I've come this far. winsRawData = getStatW.text; //That is the wins string formated as explained above string[] winSplits = winsRawData.Split('/'); for(int i = 0; i < winSplits.Length; i++) { if(winSplits[i].Split(',')[0] == room.ToString()) //room is the roomPrize that i want to affect { //newWins is the new win count that I want to update with //winSplits[i].Split(',')[1] == newWins; <-- I just need to do that } } Thanks

Viewing all articles
Browse latest Browse all 9

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>