当前位置: 首页>>代码示例>>C#>>正文


C# String.ToLower方法代码示例

本文整理汇总了C#中String.ToLower方法的典型用法代码示例。如果您正苦于以下问题:C# String.ToLower方法的具体用法?C# String.ToLower怎么用?C# String.ToLower使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在String的用法示例。


在下文中一共展示了String.ToLower方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SmtpHeader

		public SmtpHeader(String n, String v)
		{
			foreach (String r in _restricted)
			{
				if (r == n.ToLower()) throw new SmtpException(n + ": restricted header");
			}

			Name = n;
			Value = v;
		}
开发者ID:HaKDMoDz,项目名称:eStd,代码行数:10,代码来源:SmtpHeader.cs

示例2: IsParameterTrue

    // Determine if a particular parameter is true.
    public bool IsParameterTrue(String paramName)
			{
				String value = parameters[paramName.ToLower()];
				if(value == null)
				{
					// Special check for "--x" forms of option names.
					value = parameters["-" + paramName.ToLower()];
				}
				if(value == null)
				{
					return false;
				}
				else if(String.Compare(value, "true", true) == 0 ||
						String.Compare(value, "yes", true) == 0 ||
						value == "1" || value == String.Empty)
				{
				    return true;
				}
				else
				{
				    return false;
				}
		    }
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:24,代码来源:InstallContext.cs

示例3: GetServerTypeForUri

            [System.Security.SecurityCritical]  // auto-generated
            internal Type GetServerTypeForUri(String URI)
            {
                Contract.Assert(null != URI, "null != URI");

                Type serverType = null;
                String uriLower = URI.ToLower(CultureInfo.InvariantCulture);

                WellKnownServiceTypeEntry entry = 
                        (WellKnownServiceTypeEntry)_wellKnownExportInfo[uriLower];

                if(entry != null)
                {
                    serverType = LoadType(entry.TypeName, entry.AssemblyName);
                }

                return serverType;
            }
开发者ID:REALTOBIZ,项目名称:mono,代码行数:18,代码来源:configuration.cs

示例4: RegexBoyerMoore

        // Constructs a Boyer-Moore state machine for searching for the string
        // pattern. The string must not be zero-length.
        internal RegexBoyerMoore(String pattern, bool caseInsensitive, bool rightToLeft, CultureInfo culture) {
            Debug.Assert(pattern.Length != 0, "RegexBoyerMoore called with an empty string.  This is bad for perf");

            int beforefirst;
            int last;
            int bump;
            int examine;
            int scan;
            int match;
            char ch;

            
            if (caseInsensitive)
                pattern = pattern.ToLower(culture);

            _pattern = pattern;
            _rightToLeft = rightToLeft;
            _caseInsensitive = caseInsensitive;
            _culture = culture;
            
            if (!rightToLeft) {
                beforefirst = -1;
                last = pattern.Length - 1;
                bump = 1;
            }
            else {
                beforefirst = pattern.Length;
                last = 0;
                bump = -1;
            }

            // PART I - the good-suffix shift table
            // 
            // compute the positive requirement:
            // if char "i" is the first one from the right that doesn't match,
            // then we know the matcher can advance by _positive[i].
            //
            _positive = new int[pattern.Length];

            examine = last;
            ch = pattern[examine];
            _positive[examine] = bump;
            examine -= bump;

            for (;;) {
                // find an internal char (examine) that matches the tail

                for (;;) {
                    if (examine == beforefirst)
                        goto OuterloopBreak;
                    if (pattern[examine] == ch)
                        break;
                    examine -= bump;
                }

                match = last;
                scan = examine;

                // find the length of the match

                for (;;) {
                    if (scan == beforefirst || pattern[match] != pattern[scan]) {
                        // at the end of the match, note the difference in _positive
                        // this is not the length of the match, but the distance from the internal match
                        // to the tail suffix. 
                        if (_positive[match] == 0)
                            _positive[match] = match - scan;

                        // System.Diagnostics.Debug.WriteLine("Set positive[" + match + "] to " + (match - scan));

                        break;
                    }

                    scan -= bump;
                    match -= bump;
                }

                examine -= bump;
            }

            OuterloopBreak:

            match = last - bump;

            // scan for the chars for which there are no shifts that yield a different candidate

            /**        
             */
            while (match != beforefirst) {
                if (_positive[match] == 0)
                    _positive[match] = bump;

                match -= bump;
            }

            //System.Diagnostics.Debug.WriteLine("good suffix shift table:");
            //for (int i=0; i<_positive.Length; i++)
            //    System.Diagnostics.Debug.WriteLine("\t_positive[" + i + "] = " + _positive[i]);
//.........这里部分代码省略.........
开发者ID:ArildF,项目名称:masters,代码行数:101,代码来源:regexboyermoore.cs

示例5: GetPropertyByColumn

 /// <summary>
 /// 根据column名称,获取获取某个属性的元数据信息(已封装成EntityPropertyInfo)
 /// </summary>
 /// <param name="columnName"></param>
 /// <returns></returns>
 public EntityPropertyInfo GetPropertyByColumn( String columnName ) {
     return (_propertyHashTable[columnName.ToLower()] as EntityPropertyInfo);
 }
开发者ID:mfz888,项目名称:xcore,代码行数:8,代码来源:EntityInfo.cs

示例6: GetProperty

 /// <summary>
 /// 获取某个属性的元数据信息(已封装成EntityPropertyInfo)
 /// </summary>
 /// <param name="propertyName"></param>
 /// <returns></returns>
 public EntityPropertyInfo GetProperty( String propertyName ) {
     return (_propertyHashTable[propertyName.ToLower()] as EntityPropertyInfo);
 }
开发者ID:mfz888,项目名称:xcore,代码行数:8,代码来源:EntityInfo.cs

示例7: CheckPropertyName

            /**
             * Using reflection, calls a method on a widget that checks if the name for the property
             * that needs to be set is correct.
             * @param widgetType The widget type on which we need to do the property validity checking.
             * @param propertyName The name of the property that needs to be checked.
             * @throws InvalidPropertyNameException This exception is thrown if the set property name is incorrect.
             */
            private void CheckPropertyName(Type widgetType, String propertyName)
            {
                bool propertyExists = false;
                // we first check to see if the widgetType has that property implemented
                foreach (PropertyInfo pinfo in widgetType.GetProperties())
                {
                    foreach (Attribute attr in pinfo.GetCustomAttributes(false))
                    {
                        if (attr.GetType() == typeof(MoSyncWidgetPropertyAttribute))
                        {
                            MoSyncWidgetPropertyAttribute e = (MoSyncWidgetPropertyAttribute)attr;
                            if (e.Name.ToLower().Equals(propertyName.ToLower()))
                            {
                                propertyExists = true;
                            }
                        }
                    }
                }

                // if the property doesn't exist, we throw a InvalidPropertyNameException
                if (!propertyExists)
                {
                    throw new InvalidPropertyNameException();
                }
            }
开发者ID:nagyist,项目名称:MoSync-MoSync,代码行数:32,代码来源:MoSyncNativeUIAsync.cs

示例8: IsValidIdentifier

	// Determine if "value" is a valid identifier.
	protected override bool IsValidIdentifier(String value)
			{
				if(value == null || value.Length == 0)
				{
					return false;
				}
				switch(value[value.Length - 1])
				{
					case '%': case '&': case '@': case '!':
					case '#': case '$':
					{
						// Strip the type suffix character from the identifier.
						value = value.Substring(0, value.Length - 1);
						if(value.Length == 0)
						{
							return false;
						}
					}
					break;

					default: break;
				}
				if(Array.IndexOf(reservedWords, value.ToLower
									(CultureInfo.InvariantCulture)) != -1)
				{
					return false;
				}
				else
				{
					return IsValidLanguageIndependentIdentifier(value);
				}
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:33,代码来源:VBCodeCompiler.cs

示例9: Get

        /// <devdoc>
        ///    <para>Allows access to individual items in the collection by name.</para>
        /// </devdoc>
        public override String Get(String field)
        { 
            if (field == null)
                return String.Empty;

            field = field.ToLower(CultureInfo.InvariantCulture);

            switch (field) {
                case "cookie":
                    return Cookie;

                case "flags":
                    return Flags.ToString("G", CultureInfo.InvariantCulture);

                case "keysize":
                    return KeySize.ToString("G", CultureInfo.InvariantCulture);

                case "secretkeysize":
                    return SecretKeySize.ToString(CultureInfo.InvariantCulture);

                case "issuer":
                    return Issuer;

                case "serverissuer":
                    return ServerIssuer;

                case "subject":
                    return Subject;

                case "serversubject":
                    return ServerSubject;

                case "serialnumber":
                    return SerialNumber;

                case "certificate":
                    return System.Text.Encoding.Default.GetString(Certificate);

                case "binaryissuer":
                    return System.Text.Encoding.Default.GetString(BinaryIssuer);

                case "publickey":
                    return System.Text.Encoding.Default.GetString(PublicKey);

                case "encoding":
                    return CertEncoding.ToString("G", CultureInfo.InvariantCulture);

                case "validfrom":
                    return HttpUtility.FormatHttpDateTime(ValidFrom);

                case "validuntil":
                    return HttpUtility.FormatHttpDateTime(ValidUntil);
            }

            if (StringUtil.StringStartsWith(field, "issuer"))
                return ExtractString(Issuer, field.Substring(6));

            if (StringUtil.StringStartsWith(field, "subject")) {
                if (field.Equals("subjectemail"))
                    return ExtractString(Subject, "e");
                else
                    return ExtractString(Subject, field.Substring(7));
            }

            if (StringUtil.StringStartsWith(field, "serversubject"))
                return ExtractString(ServerSubject, field.Substring(13));

            if (StringUtil.StringStartsWith(field, "serverissuer"))
                return ExtractString(ServerIssuer, field.Substring(12));

            return String.Empty;
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:75,代码来源:HttpClientCertificate.cs

示例10: NameConflicts

        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        private bool NameConflicts(String name) {
            if (name == null) {
                return false;
            }

            Debug.Assert(_postBackEventTargetVarName.ToLower(CultureInfo.InvariantCulture) == _postBackEventTargetVarName &&
                _postBackEventArgumentVarName.ToLower(CultureInfo.InvariantCulture) == _postBackEventArgumentVarName &&
                _shortNamePrefix.ToLower(CultureInfo.InvariantCulture) == _shortNamePrefix);

            name = name.ToLower(CultureInfo.InvariantCulture);
            return name == _postBackEventTargetVarName ||
                name == _postBackEventArgumentVarName ||
                StringUtil.StringStartsWith(name, _shortNamePrefix);
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:17,代码来源:WmlTextWriter.cs

示例11: GetWildcardFilterIndex

	// Get the filter index corresponding to a particular wildcard pattern.
	// Returns zero if there is no matching filter.
	private int GetWildcardFilterIndex(String pattern)
			{
				// Convert Unix-style wildcards into DOS-style wildcards.
				if(pattern == "*")
				{
					pattern = "*.*";
				}
				pattern = pattern.ToLower();

				// Find the pattern that matches.
				int index, posn;
				String filter;
				for(index = 0; index < filterPatterns.Length; ++index)
				{
					filter = filterPatterns[index];
					posn = filter.IndexOf(pattern);
					if(posn != -1)
					{
						if(posn == 0 || filter[posn - 1] == ';')
						{
							if((posn + pattern.Length) == filter.Length)
							{
								return index + 1;
							}
							else if((posn + pattern.Length) < filter.Length &&
									filter[posn + pattern.Length] == ';')
							{
								return index + 1;
							}
						}
					}
				}
				return 0;
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:36,代码来源:FileDialog.cs

示例12: Push

 internal void Push(String tagName)
 {
     _tagStack.Push(tagName.ToLower(CultureInfo.InvariantCulture));
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:4,代码来源:SimpleParser.cs

示例13: Note

 public Note(string notepad, String title, String Content, DateTime date)
 {
     this.notepad = notepad.ToLower();
     this.title = title.ToLower();
     this.content = Content;
     this.date = date;
 }
开发者ID:RodionXedin,项目名称:YetAnotherEvernote,代码行数:7,代码来源:NotepadRepo.cs

示例14: IsReservedWord

	// Determine if a string is a reserved word.
	private static bool IsReservedWord(String value)
			{
				if(value != null)
				{
					value = value.ToLower(CultureInfo.InvariantCulture);
					return (Array.IndexOf(reservedWords, value) != -1);
				}
				else
				{
					return false;
				}
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:13,代码来源:VBCodeCompiler.cs

示例15: StartupWellKnownObject

            [System.Security.SecurityCritical]  // auto-generated
            internal ServerIdentity StartupWellKnownObject(String URI)
            {
                Contract.Assert(null != URI, "null != URI");
                
                String uriLower = URI.ToLower(CultureInfo.InvariantCulture);
                ServerIdentity ident = null;

                WellKnownServiceTypeEntry entry = 
                    (WellKnownServiceTypeEntry)_wellKnownExportInfo[uriLower];
                if (entry != null)
                {
                    ident = StartupWellKnownObject(
                        entry.AssemblyName,
                        entry.TypeName,
                        entry.ObjectUri,
                        entry.Mode);

                }

                return ident;
            }
开发者ID:REALTOBIZ,项目名称:mono,代码行数:22,代码来源:configuration.cs


注:本文中的String.ToLower方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。