Hello, I'm trying to split a larger text file into equal segments, with the last segment not being the same length as the other segments, just because of how it works out.
This is my code so far :
I guess i need to like find out the remainder, by like max - already done and then use that as a final substring set?
sorry for sloppy code, i'm ****ing dead tired and my brain isn't working right atm
This is my code so far :
Code:
Dim XM% = mystring.Length / 75000 ' Divide by segment size
Dim XM2% = Math.Round(XM, 1) ' Round to nearest tenth spot
Dim IX% = 0
For I% = 0 To XM2
IO.File.WriteAllText("FilePath", mystring.Substring(IX, IX + 75000)))
IX% += 75001
Nextsorry for sloppy code, i'm ****ing dead tired and my brain isn't working right atm