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
- TextBounds.cs
- HtmlControlPersistable.cs
- WebPartDisplayModeCollection.cs
- __TransparentProxy.cs
- XMLSyntaxException.cs
- Debug.cs
- QueryStringConverter.cs
- TransactionCache.cs
- SupportsEventValidationAttribute.cs
- XamlClipboardData.cs
- GeneralTransform2DTo3DTo2D.cs
- SettingsPropertyCollection.cs
- Condition.cs
- HashSetDebugView.cs
- WorkflowMessageEventArgs.cs
- DesignerLinkAdapter.cs
- PageSettings.cs
- StylusPointProperty.cs
- SqlRowUpdatedEvent.cs
- DatePickerDateValidationErrorEventArgs.cs
- RotateTransform3D.cs
- Debug.cs
- GcHandle.cs
- Matrix.cs
- SecurityHeaderElementInferenceEngine.cs
- JulianCalendar.cs
- TrustLevelCollection.cs
- SQLStringStorage.cs
- XmlILAnnotation.cs
- BindingOperations.cs
- DrawingContextDrawingContextWalker.cs
- VsPropertyGrid.cs
- BaseDataBoundControl.cs
- RSAPKCS1SignatureDeformatter.cs
- InvokeProviderWrapper.cs
- PointHitTestParameters.cs
- CriticalFinalizerObject.cs
- FileRecordSequenceCompletedAsyncResult.cs
- DataTableReaderListener.cs
- StrongNameIdentityPermission.cs
- PersonalizationState.cs
- ISAPIApplicationHost.cs
- OdbcTransaction.cs
- ErrorCodes.cs
- Oci.cs
- SoapDocumentServiceAttribute.cs
- ProfileModule.cs
- streamingZipPartStream.cs
- DbDeleteCommandTree.cs
- UseAttributeSetsAction.cs
- ReadOnlyMetadataCollection.cs
- XmlElementAttributes.cs
- AdRotator.cs
- RefreshResponseInfo.cs
- NamedObject.cs
- MsmqIntegrationBindingElement.cs
- StoreContentChangedEventArgs.cs
- CompoundFileReference.cs
- TransactionManager.cs
- UseLicense.cs
- Authorization.cs
- TextParaClient.cs
- WebRequestModuleElement.cs
- StopStoryboard.cs
- ToolStripDropDown.cs
- TablePatternIdentifiers.cs
- ImmComposition.cs
- ScriptReferenceBase.cs
- ApplicationManager.cs
- FormatterConverter.cs
- FormClosingEvent.cs
- StringAnimationUsingKeyFrames.cs
- GAC.cs
- SnapLine.cs
- CustomValidator.cs
- StrongNameIdentityPermission.cs
- AuthenticationService.cs
- RelationshipEndCollection.cs
- SourceFileBuildProvider.cs
- parserscommon.cs
- PermissionSet.cs
- WinCategoryAttribute.cs
- CrossSiteScriptingValidation.cs
- BlobPersonalizationState.cs
- COAUTHINFO.cs
- ApplicationTrust.cs
- DataGridViewSelectedColumnCollection.cs
- NameValueFileSectionHandler.cs
- DriveInfo.cs
- HttpCacheParams.cs
- ColorConvertedBitmap.cs
- FieldInfo.cs
- ParameterElementCollection.cs
- CommandConverter.cs
- VirtualPathProvider.cs
- HtmlSelect.cs
- ErrorWrapper.cs
- EntityCollectionChangedParams.cs
- ListenerServiceInstallComponent.cs
- DummyDataSource.cs