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
- SelectedCellsCollection.cs
- PointValueSerializer.cs
- XmlNamedNodeMap.cs
- ReadOnlyCollectionBuilder.cs
- ProcessMessagesAsyncResult.cs
- ToolStripSettings.cs
- RelatedEnd.cs
- TypeSystemHelpers.cs
- Expander.cs
- CounterNameConverter.cs
- TransformerInfoCollection.cs
- BitmapMetadataEnumerator.cs
- LocalFileSettingsProvider.cs
- ButtonFlatAdapter.cs
- _ConnectOverlappedAsyncResult.cs
- NativeCompoundFileAPIs.cs
- WebBrowserEvent.cs
- EdgeModeValidation.cs
- ConvertEvent.cs
- DecoderExceptionFallback.cs
- SimpleRecyclingCache.cs
- DrawingImage.cs
- ButtonStandardAdapter.cs
- _BufferOffsetSize.cs
- PcmConverter.cs
- ProcessingInstructionAction.cs
- MaskInputRejectedEventArgs.cs
- DataSourceGeneratorException.cs
- Command.cs
- ByteAnimationUsingKeyFrames.cs
- WinFormsSecurity.cs
- SiteMapPath.cs
- WindowsFormsLinkLabel.cs
- WmlImageAdapter.cs
- GridViewCancelEditEventArgs.cs
- SecurityPolicySection.cs
- ExpressionBinding.cs
- LinkConverter.cs
- ImageKeyConverter.cs
- StrongNameUtility.cs
- Frame.cs
- ObjectItemCollection.cs
- PropertyGeneratedEventArgs.cs
- Ref.cs
- XPathAncestorIterator.cs
- DesignerAttribute.cs
- GroupStyle.cs
- Vector3DAnimation.cs
- LogicalCallContext.cs
- SynchronizedInputPattern.cs
- OdbcConnectionFactory.cs
- ValidationErrorEventArgs.cs
- ValidatingCollection.cs
- COM2ICategorizePropertiesHandler.cs
- CipherData.cs
- SelectionItemProviderWrapper.cs
- MDIClient.cs
- AmbiguousMatchException.cs
- StorageMappingItemCollection.cs
- XomlCompilerParameters.cs
- MembershipUser.cs
- XPathDocumentIterator.cs
- BuilderInfo.cs
- RestHandler.cs
- UnknownBitmapEncoder.cs
- WebPartVerb.cs
- WebHeaderCollection.cs
- NavigationProperty.cs
- PictureBox.cs
- ProjectionCamera.cs
- RawStylusActions.cs
- TextureBrush.cs
- ContextStack.cs
- Exceptions.cs
- SafeSystemMetrics.cs
- AttributeProviderAttribute.cs
- DataGridLinkButton.cs
- DataSourceCache.cs
- ExpressionBuilder.cs
- MultiTrigger.cs
- UrlMappingsSection.cs
- FontFamily.cs
- KnownTypes.cs
- PeerCollaboration.cs
- CodeAttributeDeclaration.cs
- RIPEMD160Managed.cs
- BitArray.cs
- SerializerProvider.cs
- ReadOnlyDictionary.cs
- MDIWindowDialog.cs
- BufferModesCollection.cs
- SymLanguageType.cs
- _IPv6Address.cs
- DependencyPropertyKey.cs
- BitmapMetadataBlob.cs
- SqlReorderer.cs
- RangeBase.cs
- SiteMapDataSourceView.cs
- PrintDialog.cs
- MailMessageEventArgs.cs