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
- ToolboxItemAttribute.cs
- PrintDialogDesigner.cs
- StringUtil.cs
- MatrixKeyFrameCollection.cs
- GeometryHitTestResult.cs
- RuntimeConfigLKG.cs
- ProgressBarAutomationPeer.cs
- AddInController.cs
- SqlAliasesReferenced.cs
- FontUnitConverter.cs
- FixedSOMElement.cs
- SchemaCollectionPreprocessor.cs
- DateTimePicker.cs
- EncryptedXml.cs
- TextEndOfLine.cs
- DistributedTransactionPermission.cs
- TextEditorParagraphs.cs
- AmbientValueAttribute.cs
- LayoutInformation.cs
- DataAdapter.cs
- XmlTextEncoder.cs
- UnsafeNativeMethodsPenimc.cs
- CaseInsensitiveOrdinalStringComparer.cs
- RawKeyboardInputReport.cs
- GetParentChain.cs
- TextAdaptor.cs
- BuildProvidersCompiler.cs
- HwndHostAutomationPeer.cs
- FileInfo.cs
- WebBrowserNavigatedEventHandler.cs
- BooleanKeyFrameCollection.cs
- RequestTimeoutManager.cs
- FilteredDataSetHelper.cs
- DynamicResourceExtensionConverter.cs
- NameService.cs
- LayoutEvent.cs
- HashCryptoHandle.cs
- BooleanToSelectiveScrollingOrientationConverter.cs
- CatalogPart.cs
- ImmutableAssemblyCacheEntry.cs
- MsmqIntegrationElement.cs
- IndentTextWriter.cs
- ComponentChangedEvent.cs
- Drawing.cs
- ByteArrayHelperWithString.cs
- COM2FontConverter.cs
- RankException.cs
- Barrier.cs
- SemaphoreSecurity.cs
- DataGridItem.cs
- InputLangChangeRequestEvent.cs
- WebContext.cs
- NetCodeGroup.cs
- NativeRecognizer.cs
- AssemblyName.cs
- DNS.cs
- HttpCacheVary.cs
- ImplicitInputBrush.cs
- ClosableStream.cs
- ElementNotAvailableException.cs
- SafeCryptHandles.cs
- MILUtilities.cs
- FacetEnabledSchemaElement.cs
- SmiEventSink_DeferedProcessing.cs
- StylusTip.cs
- _OSSOCK.cs
- XmlCountingReader.cs
- ButtonChrome.cs
- PackageRelationshipCollection.cs
- CrossContextChannel.cs
- ProcessStartInfo.cs
- CornerRadiusConverter.cs
- ExtentCqlBlock.cs
- StorageMappingFragment.cs
- CancellationTokenRegistration.cs
- OptimizedTemplateContentHelper.cs
- ToolboxItemFilterAttribute.cs
- NoClickablePointException.cs
- ProcessInputEventArgs.cs
- UnsafeNativeMethods.cs
- ResourceExpressionBuilder.cs
- CurrencyWrapper.cs
- SudsCommon.cs
- StringComparer.cs
- HtmlAnchor.cs
- MsmqMessageSerializationFormat.cs
- MeshGeometry3D.cs
- SamlAuthorizationDecisionClaimResource.cs
- PathFigureCollectionConverter.cs
- mediaclock.cs
- EntityWrapper.cs
- TraversalRequest.cs
- ArrayHelper.cs
- Misc.cs
- RewritingProcessor.cs
- DoubleLinkListEnumerator.cs
- MenuItemBinding.cs
- BamlRecordHelper.cs
- SaveFileDialog.cs
- DbConnectionPoolGroupProviderInfo.cs