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
- ImageUrlEditor.cs
- StorageModelBuildProvider.cs
- Timer.cs
- Int32KeyFrameCollection.cs
- DataSourceCache.cs
- WindowHelperService.cs
- StrongNamePublicKeyBlob.cs
- MobileResource.cs
- FixedSOMPageElement.cs
- Preprocessor.cs
- ScriptingJsonSerializationSection.cs
- BufferedWebEventProvider.cs
- ObjectDisposedException.cs
- Pair.cs
- DataGridViewDataConnection.cs
- VisualTarget.cs
- WindowsListView.cs
- DataViewManager.cs
- ISFClipboardData.cs
- ListControl.cs
- List.cs
- PresentationAppDomainManager.cs
- EventDrivenDesigner.cs
- TreeBuilderBamlTranslator.cs
- WebPartManagerDesigner.cs
- PersonalizationAdministration.cs
- MimeObjectFactory.cs
- ChangeConflicts.cs
- DataPagerFieldCommandEventArgs.cs
- UnsafeNativeMethods.cs
- PrimitiveType.cs
- Stack.cs
- DocumentGridPage.cs
- RequiredAttributeAttribute.cs
- DataTemplateKey.cs
- WorkflowInstanceTerminatedRecord.cs
- Form.cs
- SqlDataSource.cs
- QilPatternVisitor.cs
- UnionQueryOperator.cs
- IgnoreSectionHandler.cs
- assertwrapper.cs
- DataGrid.cs
- TreeNodeConverter.cs
- BamlTreeMap.cs
- ScopelessEnumAttribute.cs
- ExportOptions.cs
- WindowsTab.cs
- CompositionTarget.cs
- SafeEventHandle.cs
- WindowsSlider.cs
- NamespaceInfo.cs
- MissingSatelliteAssemblyException.cs
- QualifiedCellIdBoolean.cs
- CodeDelegateCreateExpression.cs
- MenuItemBindingCollection.cs
- TextServicesCompartmentEventSink.cs
- _WinHttpWebProxyDataBuilder.cs
- XmlStreamStore.cs
- QuaternionKeyFrameCollection.cs
- XmlReader.cs
- TdsParserHelperClasses.cs
- InternalBufferOverflowException.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- SafeRightsManagementQueryHandle.cs
- ConsumerConnectionPoint.cs
- NativeMethodsCLR.cs
- StatusBarPanelClickEvent.cs
- ZipIOCentralDirectoryFileHeader.cs
- ObjectItemCollection.cs
- SafeTimerHandle.cs
- TypeSystemProvider.cs
- DoubleStorage.cs
- EntityDataSourceValidationException.cs
- TemplateParser.cs
- CaseInsensitiveComparer.cs
- Thumb.cs
- UpdateException.cs
- StaticResourceExtension.cs
- PeerTransportSecuritySettings.cs
- ProfileEventArgs.cs
- DataGridViewRowsAddedEventArgs.cs
- Helpers.cs
- Invariant.cs
- CompositeKey.cs
- AnonymousIdentificationModule.cs
- SiteMapHierarchicalDataSourceView.cs
- FuncCompletionCallbackWrapper.cs
- EnterpriseServicesHelper.cs
- MimeMapping.cs
- NavigatingCancelEventArgs.cs
- ProtocolsSection.cs
- ControlBindingsCollection.cs
- DataBindingCollectionEditor.cs
- HttpWrapper.cs
- UIAgentMonitor.cs
- ListCommandEventArgs.cs
- StorageMappingFragment.cs
- SettingsPropertyNotFoundException.cs
- TileBrush.cs