public virtual NSRange FindStartOfLine(string text, NSRange position) {
NSRange results = new NSRange(position.Location, position.Length);
var found = false;
// Find starting line boundry
while(results.Location > 0 && !found) {
var c = text [(int)results.Location - 1];
found = (c == Newline || c == LineSeparator || c == ParagraphSeparator);
if (!found) results.Location -= 1;
};
// Calculate length
results.Length = position.Location - results.Location;
return results;
}