Home / Function/ applyUpperCasePattern() — netty Function Reference

applyUpperCasePattern() — netty Function Reference

Architecture documentation for the applyUpperCasePattern() function in SWARUtil.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  4abd060d_3f20_7d88_268d_11e360f76723["applyUpperCasePattern()"]
  42ee86cb_49f5_6d26_1f37_9aa45922bfe1["SWARUtil"]
  4abd060d_3f20_7d88_268d_11e360f76723 -->|defined in| 42ee86cb_49f5_6d26_1f37_9aa45922bfe1
  f3d78f65_6cd7_0186_e670_bf08a9b7f61f["containsUpperCase()"]
  f3d78f65_6cd7_0186_e670_bf08a9b7f61f -->|calls| 4abd060d_3f20_7d88_268d_11e360f76723
  cf12be09_4534_7ea0_a078_45d29026d5f5["toLowerCase()"]
  cf12be09_4534_7ea0_a078_45d29026d5f5 -->|calls| 4abd060d_3f20_7d88_268d_11e360f76723
  style 4abd060d_3f20_7d88_268d_11e360f76723 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

common/src/main/java/io/netty/util/internal/SWARUtil.java lines 62–71

    private static long applyUpperCasePattern(final long word) {
        // Inspired by https://github.com/facebook/folly/blob/add4049dd6c2371eac05b92b6fd120fd6dd74df5/folly/String.cpp
        long rotated = word & 0x7F7F7F7F7F7F7F7FL;
        rotated += 0x2525252525252525L;
        rotated &= 0x7F7F7F7F7F7F7F7FL;
        rotated += 0x1A1A1A1A1A1A1A1AL;
        rotated &= ~word;
        rotated &= 0x8080808080808080L;
        return rotated;
    }

Domain

Subdomains

Frequently Asked Questions

What does applyUpperCasePattern() do?
applyUpperCasePattern() is a function in the netty codebase, defined in common/src/main/java/io/netty/util/internal/SWARUtil.java.
Where is applyUpperCasePattern() defined?
applyUpperCasePattern() is defined in common/src/main/java/io/netty/util/internal/SWARUtil.java at line 62.
What calls applyUpperCasePattern()?
applyUpperCasePattern() is called by 2 function(s): containsUpperCase, toLowerCase.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free