All methods in the StringHelper class are now extension methods in .NET 4.0 builds
git-svn-id: file:///srv/devel/repo-conversion/nusu@206 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
8c63901338
commit
f304f8c783
|
@ -18,7 +18,7 @@
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\net-2.0\Debug\</OutputPath>
|
<OutputPath>bin\net-2.0\Debug\</OutputPath>
|
||||||
<DefineConstants>TRACE;DEBUG;UNITTEST;USE_XMLDOCUMENT</DefineConstants>
|
<DefineConstants>TRACE;DEBUG;UNITTEST;USE_XMLDOCUMENT;NO_EXTENSION_METHODS</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<DocumentationFile>bin\net-2.0\Debug\Nuclex.Support.xml</DocumentationFile>
|
<DocumentationFile>bin\net-2.0\Debug\Nuclex.Support.xml</DocumentationFile>
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\net-2.0\Release\</OutputPath>
|
<OutputPath>bin\net-2.0\Release\</OutputPath>
|
||||||
<DefineConstants>TRACE;UNITTEST;USE_XMLDOCUMENT</DefineConstants>
|
<DefineConstants>TRACE;UNITTEST;USE_XMLDOCUMENT;NO_EXTENSION_METHODS</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<DocumentationFile>bin\net-2.0\Release\Nuclex.Support.xml</DocumentationFile>
|
<DocumentationFile>bin\net-2.0\Release\Nuclex.Support.xml</DocumentationFile>
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
<OutputPath>bin\xna-3.1-xbox360\Debug\</OutputPath>
|
<OutputPath>bin\xna-3.1-xbox360\Debug\</OutputPath>
|
||||||
<DefineConstants>TRACE;DEBUG;XBOX;XBOX360;USE_XMLDOCUMENT;NO_SERIALIZATION;NO_SYSTEMEVENTS;XNA_3</DefineConstants>
|
<DefineConstants>TRACE;DEBUG;XBOX;XBOX360;USE_XMLDOCUMENT;NO_SERIALIZATION;NO_SYSTEMEVENTS;XNA_3;NO_EXTENSION_METHODS</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<NoStdLib>true</NoStdLib>
|
<NoStdLib>true</NoStdLib>
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
<DebugType>pdbonly</DebugType>
|
<DebugType>pdbonly</DebugType>
|
||||||
<Optimize>true</Optimize>
|
<Optimize>true</Optimize>
|
||||||
<OutputPath>bin\xna-3.1-xbox360\Release\</OutputPath>
|
<OutputPath>bin\xna-3.1-xbox360\Release\</OutputPath>
|
||||||
<DefineConstants>TRACE;XBOX;XBOX360;USE_XMLDOCUMENT;NO_SERIALIZATION;NO_SYSTEMEVENTS;XNA_3</DefineConstants>
|
<DefineConstants>TRACE;XBOX;XBOX360;USE_XMLDOCUMENT;NO_SERIALIZATION;NO_SYSTEMEVENTS;XNA_3;NO_EXTENSION_METHODS</DefineConstants>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<WarningLevel>4</WarningLevel>
|
<WarningLevel>4</WarningLevel>
|
||||||
<NoStdLib>true</NoStdLib>
|
<NoStdLib>true</NoStdLib>
|
||||||
|
|
|
@ -37,7 +37,11 @@ namespace Nuclex.Support {
|
||||||
/// <paramref name="anyNotOf" /> array or -1 if all characters in the string were
|
/// <paramref name="anyNotOf" /> array or -1 if all characters in the string were
|
||||||
/// present in the <paramref name="anyNotOf" /> array.
|
/// present in the <paramref name="anyNotOf" /> array.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
|
#if NO_EXTENSION_METHODS
|
||||||
public static int IndexNotOfAny(string haystack, char[] anyNotOf) {
|
public static int IndexNotOfAny(string haystack, char[] anyNotOf) {
|
||||||
|
#else
|
||||||
|
public static int IndexNotOfAny(this string haystack, char[] anyNotOf) {
|
||||||
|
#endif
|
||||||
return IndexNotOfAny(haystack, anyNotOf, 0, haystack.Length);
|
return IndexNotOfAny(haystack, anyNotOf, 0, haystack.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +59,11 @@ namespace Nuclex.Support {
|
||||||
/// <paramref name="anyNotOf" /> array or -1 if all characters in the string were
|
/// <paramref name="anyNotOf" /> array or -1 if all characters in the string were
|
||||||
/// present in the <paramref name="anyNotOf" /> array.
|
/// present in the <paramref name="anyNotOf" /> array.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
|
#if NO_EXTENSION_METHODS
|
||||||
public static int IndexNotOfAny(string haystack, char[] anyNotOf, int startIndex) {
|
public static int IndexNotOfAny(string haystack, char[] anyNotOf, int startIndex) {
|
||||||
|
#else
|
||||||
|
public static int IndexNotOfAny(this string haystack, char[] anyNotOf, int startIndex) {
|
||||||
|
#endif
|
||||||
return IndexNotOfAny(haystack, anyNotOf, startIndex, haystack.Length - startIndex);
|
return IndexNotOfAny(haystack, anyNotOf, startIndex, haystack.Length - startIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +83,11 @@ namespace Nuclex.Support {
|
||||||
/// present in the <paramref name="anyNotOf" /> array.
|
/// present in the <paramref name="anyNotOf" /> array.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public static int IndexNotOfAny(
|
public static int IndexNotOfAny(
|
||||||
|
#if NO_EXTENSION_METHODS
|
||||||
string haystack, char[] anyNotOf, int startIndex, int count
|
string haystack, char[] anyNotOf, int startIndex, int count
|
||||||
|
#else
|
||||||
|
this string haystack, char[] anyNotOf, int startIndex, int count
|
||||||
|
#endif
|
||||||
) {
|
) {
|
||||||
int anyLength = anyNotOf.Length;
|
int anyLength = anyNotOf.Length;
|
||||||
|
|
||||||
|
@ -105,7 +117,11 @@ namespace Nuclex.Support {
|
||||||
/// <paramref name="anyNotOf" /> array or -1 if all characters in the string were
|
/// <paramref name="anyNotOf" /> array or -1 if all characters in the string were
|
||||||
/// present in the <paramref name="anyNotOf" /> array.
|
/// present in the <paramref name="anyNotOf" /> array.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
|
#if NO_EXTENSION_METHODS
|
||||||
public static int LastIndexNotOfAny(string haystack, char[] anyNotOf) {
|
public static int LastIndexNotOfAny(string haystack, char[] anyNotOf) {
|
||||||
|
#else
|
||||||
|
public static int LastIndexNotOfAny(this string haystack, char[] anyNotOf) {
|
||||||
|
#endif
|
||||||
return LastIndexNotOfAny(haystack, anyNotOf, haystack.Length - 1, haystack.Length);
|
return LastIndexNotOfAny(haystack, anyNotOf, haystack.Length - 1, haystack.Length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +139,11 @@ namespace Nuclex.Support {
|
||||||
/// <paramref name="anyNotOf" /> array or -1 if all characters in the string were
|
/// <paramref name="anyNotOf" /> array or -1 if all characters in the string were
|
||||||
/// present in the <paramref name="anyNotOf" /> array.
|
/// present in the <paramref name="anyNotOf" /> array.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
|
#if NO_EXTENSION_METHODS
|
||||||
public static int LastIndexNotOfAny(string haystack, char[] anyNotOf, int startIndex) {
|
public static int LastIndexNotOfAny(string haystack, char[] anyNotOf, int startIndex) {
|
||||||
|
#else
|
||||||
|
public static int LastIndexNotOfAny(this string haystack, char[] anyNotOf, int startIndex) {
|
||||||
|
#endif
|
||||||
return LastIndexNotOfAny(haystack, anyNotOf, startIndex, startIndex + 1);
|
return LastIndexNotOfAny(haystack, anyNotOf, startIndex, startIndex + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +163,11 @@ namespace Nuclex.Support {
|
||||||
/// present in the <paramref name="anyNotOf" /> array.
|
/// present in the <paramref name="anyNotOf" /> array.
|
||||||
/// </returns>
|
/// </returns>
|
||||||
public static int LastIndexNotOfAny(
|
public static int LastIndexNotOfAny(
|
||||||
|
#if NO_EXTENSION_METHODS
|
||||||
string haystack, char[] anyNotOf, int startIndex, int count
|
string haystack, char[] anyNotOf, int startIndex, int count
|
||||||
|
#else
|
||||||
|
this string haystack, char[] anyNotOf, int startIndex, int count
|
||||||
|
#endif
|
||||||
) {
|
) {
|
||||||
int anyLength = anyNotOf.Length;
|
int anyLength = anyNotOf.Length;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user