Bug Fix - Allow save if text is shorter than 4 characters
This commit is contained in:
parent
7d79be9a69
commit
843c3fc85a
@ -614,9 +614,10 @@ namespace Volian.Controls.Library
|
||||
// remove a space if there is one as the first character or the last character
|
||||
if (retval[0]==' ')retval = retval.Remove(0, 1);
|
||||
retval = retval.TrimEnd(' ');
|
||||
// remove \r\n and \par at end of string.
|
||||
if (retval.Substring(retval.Length - 2, 2) == "\r\n") retval = retval.Remove(retval.Length - 2, 2);
|
||||
if (retval.Substring(retval.Length - 4, 4) == @"\par") retval = retval.Remove(retval.Length - 4, 4);
|
||||
// remove \r\n at end of string if the string has 2 or more characters
|
||||
if (retval.Length > 1 && retval.Substring(retval.Length - 2, 2) == "\r\n") retval = retval.Remove(retval.Length - 2, 2);
|
||||
// remove \par at end of string if the string has 4 or more characters
|
||||
if (retval.Length > 3 && retval.Substring(retval.Length - 4, 4) == @"\par") retval = retval.Remove(retval.Length - 4, 4);
|
||||
|
||||
if (retval.Length == 0) return "";
|
||||
if (retval.Substring(retval.Length - 2, 2) == @"\v") retval = retval.Remove(retval.Length - 2, 2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user