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
- ImageDrawing.cs
- AnonymousIdentificationModule.cs
- UserNamePasswordValidator.cs
- Propagator.ExtentPlaceholderCreator.cs
- EncryptedReference.cs
- HttpFileCollection.cs
- DashStyle.cs
- Model3D.cs
- RepeatButtonAutomationPeer.cs
- RectAnimationClockResource.cs
- SafeLibraryHandle.cs
- DependencyPropertyAttribute.cs
- basevalidator.cs
- EntityContainerRelationshipSet.cs
- RefType.cs
- XmlIlVisitor.cs
- XmlEncodedRawTextWriter.cs
- SemanticKeyElement.cs
- SecurityException.cs
- SiteMapNodeCollection.cs
- DataGridViewCellValueEventArgs.cs
- AmbiguousMatchException.cs
- SymbolType.cs
- BindingMAnagerBase.cs
- CounterCreationDataConverter.cs
- Operand.cs
- CellIdBoolean.cs
- VirtualDirectoryMappingCollection.cs
- SmtpLoginAuthenticationModule.cs
- InlineUIContainer.cs
- CTreeGenerator.cs
- RubberbandSelector.cs
- XmlSchemaObjectTable.cs
- FixedPosition.cs
- TraceSection.cs
- DBAsyncResult.cs
- TextFormatterImp.cs
- DurableInstanceProvider.cs
- SmiTypedGetterSetter.cs
- CodeGen.cs
- AccessDataSourceView.cs
- SharedPersonalizationStateInfo.cs
- DefaultSerializationProviderAttribute.cs
- DataGridRelationshipRow.cs
- CodeParameterDeclarationExpression.cs
- sqlmetadatafactory.cs
- UriWriter.cs
- DataControlPagerLinkButton.cs
- WebBaseEventKeyComparer.cs
- AutomationElementCollection.cs
- Input.cs
- WhileDesigner.cs
- ContainerControl.cs
- PolygonHotSpot.cs
- PauseStoryboard.cs
- EntityContainerEntitySet.cs
- CompositeKey.cs
- StatusBarItemAutomationPeer.cs
- OleServicesContext.cs
- WindowsRichEditRange.cs
- URLIdentityPermission.cs
- RenderContext.cs
- WebPartDeleteVerb.cs
- MethodBuilder.cs
- _NtlmClient.cs
- PropertyItem.cs
- InkCanvasSelectionAdorner.cs
- Module.cs
- PartitionedStream.cs
- Polygon.cs
- AsymmetricKeyExchangeDeformatter.cs
- RegionData.cs
- RsaSecurityTokenAuthenticator.cs
- AsyncResult.cs
- FileAuthorizationModule.cs
- LoadedOrUnloadedOperation.cs
- UInt16Converter.cs
- SwitchCase.cs
- ToolStripEditorManager.cs
- FileUtil.cs
- ToolStripRendererSwitcher.cs
- __Filters.cs
- TdsRecordBufferSetter.cs
- ControlPaint.cs
- SevenBitStream.cs
- DataSourceDescriptorCollection.cs
- XmlQueryRuntime.cs
- ObjectDataSourceDisposingEventArgs.cs
- ReaderWriterLockWrapper.cs
- CornerRadiusConverter.cs
- ContravarianceAdapter.cs
- OrthographicCamera.cs
- ColorConverter.cs
- XmlSchemaIdentityConstraint.cs
- IndexedGlyphRun.cs
- SwitchElementsCollection.cs
- NativeActivityContext.cs
- LongAverageAggregationOperator.cs
- Timer.cs