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
- PlaceHolder.cs
- SqlReorderer.cs
- PopupRootAutomationPeer.cs
- HighContrastHelper.cs
- InlineUIContainer.cs
- DecimalKeyFrameCollection.cs
- COSERVERINFO.cs
- EntityDesignerDataSourceView.cs
- ProfileSettingsCollection.cs
- OleServicesContext.cs
- ControlValuePropertyAttribute.cs
- NumberEdit.cs
- SocketInformation.cs
- CollectionViewProxy.cs
- ErasingStroke.cs
- AppLevelCompilationSectionCache.cs
- Missing.cs
- SqlConnectionString.cs
- BufferBuilder.cs
- WebPartConnectionsCancelVerb.cs
- SQLInt64Storage.cs
- LineGeometry.cs
- Attachment.cs
- SubMenuStyle.cs
- Registry.cs
- ApplicationFileParser.cs
- PageAdapter.cs
- CustomErrorsSection.cs
- RandomNumberGenerator.cs
- AudioDeviceOut.cs
- ParameterSubsegment.cs
- CodeTypeParameter.cs
- Byte.cs
- ControlCachePolicy.cs
- DrawingBrush.cs
- PackWebResponse.cs
- SchemaNames.cs
- DataContractAttribute.cs
- PhoneCall.cs
- IInstanceTable.cs
- HistoryEventArgs.cs
- ListBase.cs
- RadioButton.cs
- AutomationPropertyInfo.cs
- MutexSecurity.cs
- WebPartDescription.cs
- Rotation3D.cs
- ITextView.cs
- SymbolType.cs
- ExclusiveTcpListener.cs
- EventWaitHandleSecurity.cs
- SharedPerformanceCounter.cs
- AuthenticationModuleElement.cs
- DesignerEditorPartChrome.cs
- FileRecordSequenceCompletedAsyncResult.cs
- DetailsViewUpdateEventArgs.cs
- LinqDataSourceContextEventArgs.cs
- MultipartContentParser.cs
- XmlSchemaSimpleContentExtension.cs
- MenuItemStyleCollection.cs
- RoleGroup.cs
- FontWeightConverter.cs
- OdbcConnectionOpen.cs
- ResourceProviderFactory.cs
- ListenerAdapterBase.cs
- LayoutEditorPart.cs
- XmlProcessingInstruction.cs
- COM2ColorConverter.cs
- TokenFactoryBase.cs
- ApplicationDirectory.cs
- InternalBufferOverflowException.cs
- SupportedAddressingMode.cs
- ValueCollectionParameterReader.cs
- DetailsViewRowCollection.cs
- ImmComposition.cs
- SqlMethodTransformer.cs
- XamlVector3DCollectionSerializer.cs
- UInt64.cs
- ProxyHwnd.cs
- ObjectView.cs
- HttpResponse.cs
- WindowsListViewScroll.cs
- MetadataItem_Static.cs
- RoleManagerSection.cs
- HtmlInputPassword.cs
- TextBoxLine.cs
- SoapAttributeAttribute.cs
- RowBinding.cs
- PrintPreviewGraphics.cs
- CroppedBitmap.cs
- TraceSection.cs
- X509Certificate2.cs
- SystemException.cs
- MatrixCamera.cs
- XmlBoundElement.cs
- FontUnitConverter.cs
- FileFormatException.cs
- CryptoStream.cs
- DataSourceSelectArguments.cs
- ItemsChangedEventArgs.cs