MrBig
Member
- Joined
- Jan 25, 2010
- Messages
- 419
Currently I am using this, that works correctly for GatherBuddy:
but, for some reason doesnt work with honorbuddy
To help you help me, heres a bigger version of the code to find the last line, easier for debug:
I open the HB log in Notepad++ and activated the glyphs view so that I could see the Carriage Returns + Line Feeds (CRLF for short), and they are there, so.. dont know whats up
Code:
string enteredText = myREALLYbigLog;
string lastLine = enteredText.Substring(enteredText.LastIndexOf(Environment.NewLine) + 2);
but, for some reason doesnt work with honorbuddy
To help you help me, heres a bigger version of the code to find the last line, easier for debug:
Code:
string nl = Environment.NewLine; // same as "\n"
int nllen = nl.Length;
String s1 = enteredText;
string s2;
if (s1.LastIndexOf(nl) == s1.Length - nllen)
s2 =
s1.Substring(0, s1.Length - nllen).Substring(
s1.Substring(0, s1.Length - nllen).LastIndexOf(nl) + nllen);
else
s2 = s1.Substring(s1.LastIndexOf(nl) + 2);
lastLine = s2;
I open the HB log in Notepad++ and activated the glyphs view so that I could see the Carriage Returns + Line Feeds (CRLF for short), and they are there, so.. dont know whats up
Last edited: