Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3734

To compare two string as lowercase.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.3
    • Fix Version/s: 0.10.0
    • Component/s: D - Library
    • Labels:
      None

      Description

      static bool compToLower(ubyte a, ubyte b) {
      return a == toLower(cast(char)b);
      }
      it looks unexpected result got when parameter a is uppercase and b is lowercase.

      if (startsWith!compToLower(split[0], cast(ubyte[])"content-length")) {
      ...
      }
      split[0] is string of 'Content-Length', it contains character with uppercase.

        Attachments

          Activity

            People

            • Assignee:
              gityf WangYaofu
              Reporter:
              gityf WangYaofu
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: