diff options
author | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-07-27 11:25:38 -0700 |
---|---|---|
committer | Clément Pit--Claudel <clement.pitclaudel@live.com> | 2015-07-27 11:25:38 -0700 |
commit | b61088661bea206390f487ed813fd350a50eb084 (patch) | |
tree | 7b1d96f28574d585099761a43016ac2dc51a759d /Source/Dafny/Util.cs | |
parent | c69d99690d9a25c448455df2bc8afee276b7b64c (diff) |
Small refactoring
Diffstat (limited to 'Source/Dafny/Util.cs')
-rw-r--r-- | Source/Dafny/Util.cs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Source/Dafny/Util.cs b/Source/Dafny/Util.cs index 6162d32c..a0a7fe36 100644 --- a/Source/Dafny/Util.cs +++ b/Source/Dafny/Util.cs @@ -95,13 +95,7 @@ namespace Microsoft.Dafny { /// </summary>
public static string RemoveUnderscores(string s) {
Contract.Requires(s != null);
- while (true) {
- var j = s.IndexOf('_');
- if (j == -1) {
- return s;
- }
- s = s.Substring(0, j) + s.Substring(j + 1);
- }
+ return s.Replace("_", "");
}
/// <summary>
|