This repository was archived by the owner on Dec 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +1
-25
lines changed Expand file tree Collapse file tree 3 files changed +1
-25
lines changed Original file line number Diff line number Diff line change @@ -69,11 +69,6 @@ public override string ReadAllText(string filePath)
69
69
return File . ReadAllText ( filePath ) ;
70
70
}
71
71
72
- public override string ToTitleCase ( string value )
73
- {
74
- return TextInfo . ToTitleCase ( value ) . Replace ( "_" , String . Empty ) ;
75
- }
76
-
77
72
public override string ToInvariantUpper ( char value )
78
73
{
79
74
return value . ToString ( CultureInfo . InvariantCulture ) . ToUpper ( ) ;
Original file line number Diff line number Diff line change @@ -79,8 +79,6 @@ public static void Configure(PclExport instance)
79
79
80
80
public string PlatformName = "Unknown" ;
81
81
82
- public TextInfo TextInfo = CultureInfo . InvariantCulture . TextInfo ;
83
-
84
82
public RegexOptions RegexOptions = RegexOptions . None ;
85
83
86
84
public StringComparison InvariantComparison = StringComparison . Ordinal ;
@@ -93,23 +91,6 @@ public static void Configure(PclExport instance)
93
91
94
92
public abstract string ReadAllText ( string filePath ) ;
95
93
96
- public virtual string ToTitleCase ( string value )
97
- {
98
- string [ ] words = value . Split ( '_' ) ;
99
-
100
- for ( int i = 0 ; i <= words . Length - 1 ; i ++ )
101
- {
102
- if ( ( ! object . ReferenceEquals ( words [ i ] , string . Empty ) ) )
103
- {
104
- string firstLetter = words [ i ] . Substring ( 0 , 1 ) ;
105
- string rest = words [ i ] . Substring ( 1 ) ;
106
- string result = firstLetter . ToUpper ( ) + rest . ToLower ( ) ;
107
- words [ i ] = result ;
108
- }
109
- }
110
- return string . Join ( "" , words ) ;
111
- }
112
-
113
94
// HACK: The only way to detect anonymous types right now.
114
95
public virtual bool IsAnonymousType ( Type type )
115
96
{
Original file line number Diff line number Diff line change @@ -748,7 +748,7 @@ public static string ToPascalCase(this string value)
748
748
749
749
public static string ToTitleCase ( this string value )
750
750
{
751
- return PclExport . Instance . ToTitleCase ( value ) ;
751
+ return CultureInfo . InvariantCulture . TextInfo . ToTitleCase ( value ) . Replace ( "_" , String . Empty ) ;
752
752
}
753
753
754
754
public static string ToLowercaseUnderscore ( this string value )
You can’t perform that action at this time.
0 commit comments