File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -15,5 +15,12 @@ public static string Captialize(this string input)
15
15
tokens [ 0 ] = CultureInfo . CurrentUICulture . TextInfo . ToTitleCase ( tokens [ 0 ] ) ;
16
16
return string . Join ( " " , tokens ) ;
17
17
}
18
+ public static string CapitalizeFirstLetter ( this string input )
19
+ {
20
+ if ( input . Length == 0 )
21
+ {
22
+ return string . Empty ;
23
+ }
24
+ }
18
25
}
19
26
}
Original file line number Diff line number Diff line change 8
8
using Rubberduck . Parsing . Symbols ;
9
9
using System . Windows . Forms ;
10
10
using Rubberduck . UI . Refactorings ;
11
+ using Rubberduck . Common ;
11
12
12
13
namespace Rubberduck . Inspections . QuickFixes
13
14
{
@@ -175,12 +176,7 @@ private string GetEndOfScopeStatementForDeclaration(string declaration)
175
176
} ;
176
177
private string AutoSuggestedName ( )
177
178
{
178
- return "local" + CapitalizeFirstLetter ( _target . IdentifierName ) ;
179
+ return "local" + this . _target . IdentifierName . CapitalizeFirstLetter ( ) ;
179
180
}
180
- private string CapitalizeFirstLetter ( string name )
181
- {
182
- return name . Substring ( 0 , 1 ) . ToUpper ( ) + name . Substring ( 1 ) ;
183
- }
184
-
185
181
}
186
182
}
You can’t perform that action at this time.
0 commit comments