aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
authorJeff Ames2008-01-10 06:49:29 +0000
committerJeff Ames2008-01-10 06:49:29 +0000
commit5a6fd21a2c31a41c617f1d2a7e390956b5aafb0a (patch)
tree8828dc80f2b50aca4b6726cfe20be5fe5431b12c /OpenSim/Framework/Util.cs
parent* After fighting with it a bit more, Opensim is now compatible with the most ... (diff)
downloadopensim-SC_OLD-5a6fd21a2c31a41c617f1d2a7e390956b5aafb0a.zip
opensim-SC_OLD-5a6fd21a2c31a41c617f1d2a7e390956b5aafb0a.tar.gz
opensim-SC_OLD-5a6fd21a2c31a41c617f1d2a7e390956b5aafb0a.tar.bz2
opensim-SC_OLD-5a6fd21a2c31a41c617f1d2a7e390956b5aafb0a.tar.xz
Whitespace cleanup.
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs42
1 files changed, 21 insertions, 21 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 0f41380..f80350e 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -222,7 +222,7 @@ namespace OpenSim.Framework
222 output.Append(": "); 222 output.Append(": ");
223 } 223 }
224 224
225 output.Append(CleanString(UTF8Encoding.UTF8.GetString(bytes, 0, bytes.Length - 1))); 225 output.Append(CleanString(UTF8Encoding.UTF8.GetString(bytes, 0, bytes.Length - 1)));
226 } 226 }
227 else 227 else
228 { 228 {
@@ -414,30 +414,30 @@ namespace OpenSim.Framework
414 return lluuid.UUID.ToString("n"); 414 return lluuid.UUID.ToString("n");
415 } 415 }
416 416
417 public static string CleanString(string input) 417 public static string CleanString(string input)
418 { 418 {
419 if(input.Length == 0) 419 if(input.Length == 0)
420 return input; 420 return input;
421 421
422 int clip=input.Length; 422 int clip=input.Length;
423 423
424 // Test for ++ string terminator 424 // Test for ++ string terminator
425 int pos=input.IndexOf("\0"); 425 int pos=input.IndexOf("\0");
426 if(pos != -1 && pos < clip) 426 if(pos != -1 && pos < clip)
427 clip=pos; 427 clip=pos;
428 428
429 // Test for CR 429 // Test for CR
430 pos=input.IndexOf("\r"); 430 pos=input.IndexOf("\r");
431 if(pos != -1 && pos < clip) 431 if(pos != -1 && pos < clip)
432 clip=pos; 432 clip=pos;
433 433
434 // Test for LF 434 // Test for LF
435 pos=input.IndexOf("\n"); 435 pos=input.IndexOf("\n");
436 if(pos != -1 && pos < clip) 436 if(pos != -1 && pos < clip)
437 clip=pos; 437 clip=pos;
438 438
439 // Truncate string before first end-of-line character found 439 // Truncate string before first end-of-line character found
440 return input.Substring(0, clip); 440 return input.Substring(0, clip);
441 } 441 }
442 } 442 }
443} 443}