Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / ManagedLibraries / Remoting / Channels / CORE / StringHelper.cs / 1305376 / StringHelper.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== //============================================================ // // File: StringHelper.cs // // Summary: Helper methods for strings. // //=========================================================== using System; using System.IO; using System.Runtime.Remoting; namespace System.Runtime.Remoting.Channels { internal static class StringHelper { internal static bool StartsWithDoubleUnderscore(String str) { if (str.Length < 2) return false; return (str[0] == '_') && (str[1] == '_'); } // StartsWithDoubleUnderscore internal static bool StartsWithAsciiIgnoreCasePrefixLower(String str, String asciiPrefix) { // The caller should know that the arguments aren't null. int prefixLen = asciiPrefix.Length; if (str.Length < prefixLen) return false; for (int i = 0; i < prefixLen; i++) { // The prefix is assumed to be in lowercase if (ToLowerAscii(str[i]) != asciiPrefix[i]) { return false; } } return true; } // StartsWithAsciiIgnoreCase private static char ToLowerAscii(char ch) { if ((ch >= 'A') && (ch <= 'Z')) { return (char)(ch + ('a' - 'A')); } return ch; } // ToLowerAscii } // StringHelper } // namespace System.Runtime.Remoting.Channels // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CorePropertiesFilter.cs
- MenuItemBindingCollection.cs
- AbstractDataSvcMapFileLoader.cs
- FindCompletedEventArgs.cs
- XmlSchemaAnyAttribute.cs
- ScrollChangedEventArgs.cs
- CredentialCache.cs
- WebScriptMetadataMessageEncodingBindingElement.cs
- CodeTypeOfExpression.cs
- MultiSelectRootGridEntry.cs
- DiagnosticsConfiguration.cs
- TableSectionStyle.cs
- CalendarTable.cs
- DrawingAttributesDefaultValueFactory.cs
- TemplateLookupAction.cs
- HtmlElement.cs
- BasicViewGenerator.cs
- RecordsAffectedEventArgs.cs
- MediaSystem.cs
- XmlSchemaFacet.cs
- MatcherBuilder.cs
- RectangleF.cs
- SerializationInfoEnumerator.cs
- HexParser.cs
- PageParser.cs
- SqlDataSourceEnumerator.cs
- NavigateUrlConverter.cs
- DataPagerFieldCommandEventArgs.cs
- PackageRelationship.cs
- basevalidator.cs
- GridViewPageEventArgs.cs
- NetDataContractSerializer.cs
- ConfigurationConverterBase.cs
- HttpCachePolicyWrapper.cs
- XmlNamespaceDeclarationsAttribute.cs
- Size.cs
- JsonQNameDataContract.cs
- TabControl.cs
- PatternMatcher.cs
- SafeMILHandleMemoryPressure.cs
- TextTreeRootTextBlock.cs
- XmlIgnoreAttribute.cs
- CommonObjectSecurity.cs
- QueryableDataSource.cs
- ItemMap.cs
- EnumerableRowCollectionExtensions.cs
- TabletDeviceInfo.cs
- StylusPointDescription.cs
- Guid.cs
- EnumBuilder.cs
- DATA_BLOB.cs
- HoistedLocals.cs
- UTF7Encoding.cs
- BinaryReader.cs
- WebPartDeleteVerb.cs
- Stackframe.cs
- ColumnClickEvent.cs
- RtfToXamlLexer.cs
- CompositeFontInfo.cs
- PrivilegeNotHeldException.cs
- UpdateCompiler.cs
- VersionValidator.cs
- Int32AnimationBase.cs
- EqualityArray.cs
- XmlSchemaGroup.cs
- StatusStrip.cs
- ILGen.cs
- ChineseLunisolarCalendar.cs
- __Error.cs
- EntityAdapter.cs
- FormCollection.cs
- SchemaNames.cs
- UrlRoutingModule.cs
- Msec.cs
- DesignTimeSiteMapProvider.cs
- BlurEffect.cs
- HeaderedContentControl.cs
- NamedElement.cs
- SocketAddress.cs
- TdsParserStateObject.cs
- DesignBindingConverter.cs
- UrlParameterReader.cs
- Util.cs
- ApplicationServiceHelper.cs
- MappingException.cs
- CopyAction.cs
- CommonXSendMessage.cs
- HistoryEventArgs.cs
- HuffCodec.cs
- SafeLocalAllocation.cs
- CompressionTransform.cs
- ListView.cs
- ScriptReference.cs
- SqlReferenceCollection.cs
- GroupBox.cs
- CssTextWriter.cs
- PersonalizationAdministration.cs
- Directory.cs
- Switch.cs
- WebEncodingValidator.cs