using System.Globalization;
using System.IO;
using System.Text;
+using System.Web.Util;
namespace System.Web.Compilation
{
if (len < 10 || lastQuote != len - 1)
return false;
- if (!str.ToLower (CultureInfo.InvariantCulture).StartsWith ("#include "))
+ if (!StrUtils.StartsWith (str, "#include ", true))
return false;
str = str.Substring (9).Trim ();
- bool isfile = (str.ToLower (CultureInfo.InvariantCulture).StartsWith ("file"));
- if (!isfile && !str.ToLower (CultureInfo.InvariantCulture).StartsWith ("virtual"))
+ bool isfile = (StrUtils.StartsWith (str ,"file", true));
+ if (!isfile && !StrUtils.StartsWith (str, "virtual", true))
return false;
pathType = (isfile) ? "file" : "virtual";
+2005-06-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * TagAttributes.cs:
+ * AspParser.cs:
+ * TemplateControlCompiler.cs: use invariant culture versions of starts/
+ endswith.
+
2005-06-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* TemplateControlCompiler.cs: comparison between member name and the
using System;
using System.Collections;
using System.Text;
+using System.Web.Util;
namespace System.Web.Compilation
{
if (att == null || !got_hashed)
return false;
- return (att.StartsWith ("<%#") && att.EndsWith ("%>"));
+ return (StrUtils.StartsWith (att, "<%#") && StrUtils.EndsWith (att, "%>"));
}
public Hashtable GetDictionary (string key)
using System.Text;
using System.Web;
using System.Web.UI;
+using System.Web.Util;
using System.ComponentModel.Design.Serialization;
#if NET_2_0
using System.Collections.Specialized;
return false;
string str = value.Trim ();
- return (str.StartsWith ("<%#") && str.EndsWith ("%>"));
+ return (StrUtils.StartsWith (str, "<%#") && StrUtils.EndsWith (str, "%>"));
}
#if NET_2_0
{
string str = value.Trim ();
str = str.Substring (3).Trim (); // eats "<%#"
- if (str.StartsWith ("Bind")) {
+ if (StrUtils.StartsWith (str, "Bind")) {
Match match = bindRegex.Match (str);
if (match.Success) {
string bindingName = match.Groups [1].Value;