Template:NFLPrimaryColor

From Iwe

{{#switch: {{{1}}} |AFC =background: #FCC |NFC =background: #D0E7FF |Buffalo Bills =background: #004089 |Miami Dolphins =background: #008e97 |New England Patriots =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 2000
  |background: #0d254c
  |{{#ifexpr: {{{year}}} >= 1993
   |background: #001ab2
   |{{#ifexpr: {{{year}}} >= 1960
    |background: #c0001d 
    |background: #0d254c
    }}
   }}
 }}
 |background: #0d254c
}}

|New England Patriots93thru99 =background: #001ab2 |New England Patriots71thru92 =background: #c0001d |Boston Patriots =background: #c0001d |NY Jets |New York Jets =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1998
  |background: #0C371D
  |{{#ifexpr: {{{year}}} >= 1990
   |background: #00693C
   |{{#ifexpr: {{{year}}} >= 1963
    |background: #0C371D
    |{{#ifexpr: {{{year}}} >= 1960
     |background: #000080 
     |background: #0C371D
     }}
    }}
   }}
 }}
 |background: #0C371D
}}

|New York Jets 90thru97 =background: #00693C |NY Titans |New York Titans =background: #000080 |Baltimore Ravens =background: #1E1656 |Cincinnati Bengals =background: black |Cleveland Browns =background: #312821 |Pittsburgh Pirates |Pittsburgh Steelers=

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1945
  |background: black
  |{{#ifexpr: {{{year}}} >= 1944
   |background: #97233F 
   |{{#ifexpr: {{{year}}} >= 1943
    |background: #003b48 
    |background: black
    }}
   }}
 }}
 |background: black
}}

|Philadelphia-Pittsburgh Eagles-Steelers |Pittsburgh-Philadelphia Steelers-Eagles |Phil-Pitt Eagles-Steelers |Pitt-Phil Steelers-Eagles |Philadelphia-Pittsburgh Steagles |Pittsburgh-Philadelphia Steagles |Phil-Pitt Steagles |Pitt-Phil Steagles |Steagles= background: #003b48 |Houston Texans =background: #03202F |Indianapolis Colts |Baltimore Colts =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1951
  |background: #003b7b
  |{{#ifexpr: {{{year}}} >= 1947
   |background:#063 
   |background: #003b7b
   }}
 }}
 |background: #003b7b
}}

|Baltimore Colts 53thru83 = background: #003b7b |Baltimore Colts (AAFC) |Baltimore Colts 47thru50 = background:#063 |Jacksonville Jaguars =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 2013
  |background: black
  |{{#ifexpr: {{{year}}} >= 1995
   |background: #007198
   |background: black
   }}
 }}
 |background: black
}}

|Jacksonville Jaguars 95thru12 =background: #007198 |Tennessee Titans =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1997
  |background: #648fcc
  |{{#ifexpr: {{{year}}} >= 1960
   |background: #4B92DB 
   |background: #648fcc
   }}
  }}
 |background: #648fcc
}}

|Tennessee Oilers |Houston Oilers =background: #4B92DB |Denver Broncos =

{{#if:  | 
 {{#ifexpr: {{{year}}} >= 2012
  |background: #FB4F14
  |{{#ifexpr: {{{year}}} >= 1997
   |background: #002244
   |{{#ifexpr: {{{year}}} >= 1962
    |background: #F9461C
    |{{#ifexpr: {{{year}}} >= 1960
     |background: #332B2A
     |background: #FB4F14
     }}
    }}
   }}
 }}
 |background: #FB4F14
}}

|Denver Broncos 97thru11 =background: #002244 |Denver Broncos 62thru96 =background: #F9461C |Denver Broncos 60thru61 =background: #332B2A |Kansas City Chiefs =background: #b20032 |Dallas Texans=

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1989
  |background:navy 
  |{{#ifexpr: {{{year}}} >= 1954
   |background: #B20032 
   |{{#ifexpr: {{{year}}} >= 1951
    |background: #00205B 
    |background:navy 
    }}
   }}
 }}
 |background:navy 
}}

|Dallas Texans 60thru62=background: #B20032 |Dallas Texans 52=background: #00205B |LA Raiders |Los Angeles Raiders |Oakland Raiders=background: black |San Diego Chargers =background: #024 |Dallas Cowboys =background: #c5ced6 |NY Giants |New York Giants =background: #192f6b |Philadelphia Eagles =background: #003b48 |Washington Redskins =background: #7D0008 |Chicago Bears =background: #03182f |Detroit Lions =background: #006DB0 |Green Bay Packers =background: #203731 |Minnesota Vikings =background: #3b0160 |Atlanta Falcons =background: #bd0d18 |Carolina Panthers =background: black |New Orleans Saints =background: black |Tampa Bay Buccaneers =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 2014
  |background: #D60A0B
  |{{#ifexpr: {{{year}}} >= 1997
    |background: #B20032
    |{{#ifexpr: {{{year}}} >= 1976
     |background: #FF7900
     |background: #B20032
     }}
    }}
   }}
 |background: #D60A0B
}}

|Tampa Bay Buccaneers 76thru96 =background: #FF7900 |Chicago Cardinals |Chicago-Pittsburgh Cardinals-Steelers |Pittsburgh-Chicago Steelers-Cardinals |Card-Pitt |St. Louis Cardinals |Phoenix Cardinals |Arizona Cardinals =background: #97233F |Saint Louis Rams |St. Louis Rams =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 2000
  |background: #024
  |{{#ifexpr: {{{year}}} >= 1973
   |background: #183990 
   |{{#ifexpr: {{{year}}} >= 1938
    |background: blue 
    |{{#ifexpr: {{{year}}} >= 1936
     |background: black 
     |background: #024
     }}
    }}
   }}
 }}
 |background: #024
}}

|St. Louis Rams 95thru99 =background: #183990 |LA Rams |Los Angeles Rams =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1973
  |background: #183990 
  |{{#ifexpr: {{{year}}} >= 1938
   |background: blue 
   |{{#ifexpr: {{{year}}} >= 1936
    |background: black 
    |background: #183990
    }}
   }}
 }}
 |background: #183990
}}

|Los Angeles Rams 73thru94 =background: #183990 |Los Angeles Rams 64thru72 |Los Angeles Rams 46thru63 =background: blue |Cleveland Rams =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1938
  |background: blue
  |{{#ifexpr: {{{year}}} >= 1936
   |background: black
   |background: blue
   }}
 }}
 |background: blue
}}

|Cleveland Rams 38thru45 =background: blue |Cleveland Rams 36thru37 =background: black |San Francisco 49ers =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1996
  |background: #C80815
  |{{#ifexpr: {{{year}}} >= 1964
   |background: #C8102E
   |background: #C80815
   }}
 }}
 |background: #C80815
}}

|San Francisco 49ers 64thru95 =background: #C8102E |Seattle Seahawks =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 2012
  |background: #024
  |{{#ifexpr: {{{year}}} >= 2002
   |background: #425F85
   |{{#ifexpr: {{{year}}} >= 1976
    |background: #00338D
    |background: #024
    }}
   }}
 }}
 |background: #024
}}

|Seattle Seahawks 02thru11 =background: #425F85 |Seattle Seahawks 76thru01 =background: #00338D |Akron Indians |Akron Burkhardts |Akron Pros =background: #1034A6 |Brooklyn Dodgers (NFL) |Brooklyn Tigers |Brooklyn Dodgers =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1950
  |background:#00693E 
  |{{#ifexpr: {{{year}}} >= 1948
   |background: #042B78 
   |{{#ifexpr: {{{year}}} >= 1946
    |background: #FBCC00 
    |{{#ifexpr: {{{year}}} >= 1944
     |background: #DE6108 
     |{{#ifexpr: {{{year}}} >= 1937
      |background: red
      |background:#00693E
      }}
     }}
    }}
   }}
 }}
 |background:#00693E
}}

|Brooklyn Dodgers (AAFC) =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1950
  |background: #FBCC00 
  |{{#ifexpr: {{{year}}} >= 1948
   |background: #042B78 
   |background: #FBCC00
   }}
 }}
 |background: #FBCC00
}}

|Buffalo All-Stars |Buffalo Niagaras |Buffalo Prospects |Buffalo All-Americans |Buffalo Bisons |Buffalo Rangers |Buffalo All-Americans =background: black |Cincinnati Reds (NFL) |Cincinnati Reds=background:#C8102E |Cleveland Bulldogs=background:maroon |Cleveland Tigers |Cleveland Indians=

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1928
  |background:#CF1020 
  |{{#ifexpr: {{{year}}} >= 1923
   |background:maroon 
   |background:#CF1020
   }}
 }}
 |background:#CF1020
}}

|Columbus Tigers=background:black |Columbus Panhandles=background:#7D0008 |St. Mary's Cadets |Dayton Gym-Cadets |Dayton Triangles=background:#00285D |Detroit Heralds=background:#C80815 |Detroit Tigers=background:black |Detroit Panthers=background:#003b7b |Detroit Wolverines =background:#C80815 |Kelley Duluths |Duluth Kelleys=background:#C41E3A |Ernie Nevers' Eskimos |Ernie Nevers Eskimos |Duluth Eskimos=background:#00285D |Frankford Yellowjackets |Frankford Athletic Association |Loyola Athletic Club |Frankford Yellow Jackets=background:#FFBA00 |Hammond Pros=background:#3B0160 |Waterbury Blues |Hartford Blues=

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1928
  |background:blue 
  |{{#ifexpr: {{{year}}} >= 1927
   |background:black
   |background:blue
   }}
 }}
 |background:blue
}}

|Hartford Giants=background:black |Louisville Breckenridges Club |Louisville Breckenridges |Louisville Colonels |Louisville Brecks=background:white |Congerville Athletic Club |Congerville Third |Congerville Flyers |Jonesboro Flyers |Muncie Flyers =background: #C41E3A |NY Yankees |New York Yanks |New York Americans |New York Yankees =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1950
  |background:#CF1020 
  |{{#ifexpr: {{{year}}} >= 1945
   |background: #012245 
   |{{#ifexpr: {{{year}}} >= 1930
    |background: blue 
    |background:#CF1020
    }}
   }}
 }}
 |background:#CF1020
}}

|Orange Athletic Club |Newark Tornadoes |Orange/Newark Tornadoes |Orange-Newark Tornadoes |Newark Bears |Orange Tornadoes =background:#f03a16 |Orlando Panthers =background:#D00 |Pottsville Eleven |Boston Bulldogs |Pottsville Maroons=background:maroon |Providence Steam Rollers |Providence Steamroller |Providence Steamrollers |Providence Steam Roller=background:#F03A16 |Racine Regulars |Racine Battery C |Horlick-Racine Legion |Horlick/Racine Legion |Racine Tornadoes |Racine Legion/Tornadoes |Racine Legion=background:#870619 |Rochester Jeffs |Rochester Jeffersons=background:#CF1020 |Rock Island Independents=background:#063 |Batter A Gunners |St. Louis Gunners=background:blue |Stapleton Football Club |Stapleton Ex-Service AC |Stapleton Ex-service AC |Stapleton Ex-Service Athletic Club |Stapleton Ex-service Athletic Club |Staten Island Stapes |Staten Island Stapletons=background:navy |Toledo Athletic Association |Toledo Maroons=background:maroon |BC Lions |British Columbia Lions =background: #F6791F |Calgary Bronks |Calgary Broncs |Calgary Stampeders=background: #bd0d18 |Edmonton Eskimos =background: #183118 |Hamilton Tiger-Cats =background:black |Hamilton Tigers =background:black |Hamilton Wildcats |Hamilton Flying Wildcats =background:#FF0800 |Montreal Alouettes =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1988
  |background:#1A5484
  |{{#ifexpr: {{{year}}} >= 1982
   |background:#D40000 
   |{{#ifexpr: {{{year}}} >= 1974
    |background:#00F
    |{{#ifexpr: {{{year}}} >= 1970
     |background:#2E8B57
     |{{#ifexpr: {{{year}}} >= 1946
      |background:#B31B1B
      |background:#1A5484
      }}
     }}
    }}
   }}
 }}
 |background:#1A5484
}}

|Montreal Alouettes 86thru87 =background:#D40000 |Montreal Concordes =background:#D40000 |Montreal Alouettes 74thru81 =background:#00F |Montreal Alouettes 70thru73 =background:#2E8B57 |Montreal Alouettes 46thru69 =background:#B31B1B |Ottawa Rough Riders |Ottawa Roughriders |Ottawa Senators = background:black |Ottawa Renegades = background:black |Ottawa Redblacks |Ottawa RedBlacks = background:black |Regina Rugby Club |Regina Rough Riders |Regina Roughriders =background: black |Saskatchewan Rough Riders |Saskatchewan Roughriders =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1946
  |background: #00704A
  |{{#ifexpr: {{{year}}} >= 1910
   |background: black 
   |background: #00704A
   }}
 }}
 |background: #00704A
}}

|Toronto Argonauts =background:#002147 |Winnipeg Blue Bombers =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1995
  |background: #042A5C
  |{{#ifexpr: {{{year}}} >= 1971
   |background: #01296D
   |{{#ifexpr: {{{year}}} >= 1960
    |background: #042A5C
    |{{#ifexpr: {{{year}}} >= 1935
     |background: #0A0A85 
     |background: #042A5C
     }}
    }}
   }}
 }}
 |background: #042A5C
}}

|Winnipeg Blue Bombers 71thru94 =background: #01296D |Winnipeg Blue Bombers 36thru59 |Winnipeg 'Pegs |Winnipegs |Winnipeg Winnipegs =background: #0A0A85 |Baltimore CFLers |Baltimore CFLs |Baltimore CFL Colts |Baltimore Football Club |Baltimore Stallions = background:#15317E |Birmingham Barracudas = background:black |Las Vegas Posse = background:#1E1E1E |Memphis Mad Dogs = background:#004438 |Miami Manatees= background:black |Sacramento Gold Miners = background:#004953 |San Antonio Texans = background:#006663 |Sarnia Imperials =background:red |Shreveport Pirates = background:#4B08A1 |Toronto Balmy Beach Beachers =background:#00F |Acadia Axemen = background:#C03 |Mount Allison Mounties = background:#C03 |Saint Francis Xavier X-Men |St. Francis Xavier X-Men = background:#000067 |St. Mary's Huskies |Saint Mary's Huskies = background:#800000 |Bishop Gaiters |Bishops Gaiters |Bishop's University Gaiters |Bishop's Gaiters = background:#461B7E |Concordia Stingers = background:#800000 |Laval Rouge et Or = background:#900 |McGill Redmen = background:#F00 |Montreal Carabins = background:#4169E1 |Sherbrooke Vert et Or = background:#00502F |Carleton Ravens = background:black |Guelph Gryphons = background:#F00 |McMaster Marauders = background:#903 |Ottawa Garnet and Gray |Ottawa Grenat et Gris |Ottawa Gee-Gees = background:#8F001A |Queen's University |Queens University |Queens University Golden Gaels |Queen's University Golden Gaels |Queens Golden Gaels |Queen's Gaels |Queen's Golden Gaels = background:#FC3 |Toronto Varsity Blues = background:#00204E |Waterloo Warriors = background:black |Western Ontario Mustangs = background:#554295 |Waterloo Lutheran Golden Hawks |Wilfrid Laurier Golden Hawks = background:#3D168B |Windsor Lancers = background:#00005A |York Lions = background:red |Alberta Golden Bears = background:#183118 |Calgary Dinos = background:#C00 |Manitoba Bisons = background:#272223 |Regina Rams = background:#00502F |Saskatchewan Huskies = background:#006735 |Simon Fraser Clan = background:#B5111B |University of British Columbia Thunderbirds |University of BC Thunderbirds |UBC Thunderbirds = background:#245CC8 |California Redwoods =background:#8CC540 |Florida Tuskers =background:#008FC3 |Hartford Colonials =background:#003D7E |Las Vegas Locos |Las Vegas Locomotives2009 |Las Vegas Locomotives =background:#A8A9AD |NY Sentinals |New York Sentinels =background:#242021 |Omaha Nighthawks =background:black |Sacramento Mountain Lions =background:#B08C0A |Virginia Destroyers =background:#890034 |Amsterdam Admirals =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 2000
  |background:#FF7900
  |{{#ifexpr: {{{year}}} >= 1995
   |background:#024
   |background:#FF7900
   }}
 }}
 |background:#FF7900
}}

|Amsterdam Admirals 95thru99 =background:#024 |Barcelona Dragons =background:#024731 |Berlin Thunder =background:#B3995D |Birmingham Fire =background:#024 |Cologne Centurions =background:#A71930 |Frankfurt Galaxy =background:#3B0083 |Hamburg Sea Devils =background:#006778 |London Monarchs =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1999
  |background:#DDCD69 
  |{{#ifexpr: {{{year}}} >= 1998
   |background:#002664 
   |background:#DDCD69
   }}
 }}
 |background:#DDCD69
}}

|England Monarchs =background:#002664 |Rhein Fire =background:#6E273D |Scottish Claymores =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1997
  |background:#024
  |{{#ifexpr: {{{year}}} >= 1995
   |background:#0039A6
   |background:#024
   }}
 }}
 |background:#024
}}

|Scottish Claymores 95thru96 =background:#0039A6 |Arizona Rattlers =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 2012
  |background:black
  |{{#ifexpr: {{{year}}} >= 1992
   |background:#00ADA9
   |background:black
   }}
 }}
 |background:black
}}

|Arizona Rattlers 92thru11 =background:#00ADA9 |Bossier-Shreveport Battle Wings =background:black |Alabama Vipers =background:#3F9434 |Canton Bulldogs=background:maroon |Charlotte Rage =background:#367588 |Chicago Bruisers =background:black |Chicago Rush |Chicago Rush 01thru12 =background:#00004D |Cincinnati Rockers =background:#1E4D2B |Cleveland Gladiators =background:#EE2D24 |Columbus Thunderbolts |Cleveland Thunderbolts =background:#602F6B |Colorado Crush =background:#CC6013 |Columbus Destroyers =background:#002757 |Dallas Desperados =background:#3448AB |Dallas Vigilantes =background:#CD0000 |Denver Dynamite = background:#0000B8 |Detroit Drive = background:#73C2FB |Florida Bobcats =background:black |Georgia Force =background:black |Grand Rapids Rampage =background:#FC0E0A |Iowa Barnstormers =background:black |Jacksonville Sharks =background:#D00 |Kansas City Command |Kansas City Brigade =background:#ADC4EF |LA Avengers |Los Angeles Avengers =background:#FF003F |LA Buccaneers |Los Angeles Buccaneers=background:#f03a16 |LA Cobras |Los Angeles Cobras =background:navy |LA Kiss |LA KISS |Los Angeles KISS |Los Angeles Kiss =background:black |Maryland Commandos =background:blue |Massachusetts Marauders=background:#800000 |Miami Hooters =background:#FF7F00 |Milwaukee Badgers =background:#F03A16 |Minneapolis Marines=background:red |New England Steamrollers =background:#FF7F00 |New Orleans Night =background:#191970 |New Orleans Voodoo |New Orleans VooDoo =background:#300863 |NY Dragons |New York Dragons =background:black |NY Knights |New York Knights =background:#C40233 |Orlando Predators =background:black |Philadelphia Soul =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 2012
  |background:#383838
  |{{#ifexpr: {{{year}}} >= 2004
   |background:black
   |background:#383838
   }}
 }}
 |background:#383838
}}

|Philadelphia Soul 04thru11=background:black |Pittsburgh Gladiators =background:#21441E |Pittsburgh Power =background:black |Portland Thunder =background:#03338B |Sacramento Attack =background:black |San Antonio Force =background:black |San Antonio Talons =background:#0052A3 |San Jose Sabercats |San Jose SaberCats =background:#03653C |Tampa Bay Storm =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 2012
  |background:#003F87
  |{{#ifexpr: {{{year}}} >= 1995
   |background:#012244
   |{{#ifexpr: {{{year}}} >= 1993
    |background:black
    |{{#ifexpr: {{{year}}} >= 1991
     |background:#003F87
     |{{#ifexpr: {{{year}}} >= 1987
      |background:#21441E 
      |background:#003F87
      }}
     }}
    }}
   }}
 }}
 |background:#003F87
}}

|Tampa Bay Storm 95thru11 =background:#012244 |Tampa Bay Storm 93thru94 =background:black |Tampa Bay Storm 91thru92 =background:#003F87 |Utah Blaze =background:#000006 |Utah Thunder =background:black |Washington Commandos =background:blue |Albany Firebirds =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 1994
  |background:white
  |{{#ifexpr: {{{year}}} >= 1990
   |background:#BA4D00
   |background:white
   }}
 }}
 |background:white
}}

|Albany Firebirds 90thru94=background:#BA4D00 |Amarillo Dusters =background:white |Arkansas Twisters =background:black |Austin Wranglers =background:#F00 |Boise Burn =background:#FF7F00 |Central Valley Coyotes =background:#C80815 |Mississippi Headhunters |Columbus Wardogs =background:#43CD80 |Corpus Christi Sharks =background:#73C2FB |Daytona Thunder |Daytona Beach Thunder |Daytona Beach Thunderbirds |Daytona Beach ThunderBirds =background:#9BDDFF |Florida Firecats =background:#FC9 |Green Bay Blizzard =background:#033 |Kentucky Horsemen =background:#0047AB |Louisville Fire =background:black |Lubbock Renegades =background:black |Mahoning Valley Thunder =background:#0047AB |Manchester Wolves =background:#4F94CD |Milwaukee Iron=background:black |Milwaukee Mustangs =

{{#if:  |
 {{#ifexpr: {{{year}}} >= 2003
  |background:black
  |{{#ifexpr: {{{year}}} >= 1993
   |background:#702963
   |background:black
   }}
 }}
 |background:black
}}

|Milwaukee Mustangs 94thru01 =background:#702963 |Oklahoma City Yard Dogs |Oklahoma City Yard Dawgz =background:black |Peoria Pirates =background:black |Quad City Steamwheelers =background:#191970 |Rio Grande Valley Dorados =background:#23238E |South Georgia Wildcats =background:#00F |Spokane Shock =background:#002E64 |Stockton Lightning =background:black |Tennessee Valley Vipers =background:black |Texas Copperheads =background:#388E8E |Tri-Cities Fever =background:#06324F |Tulsa Talons =background:#0052A3 |Wilkes-Barre/Scranton Pioneers =background:#00F |Baltimore Mariners =background:#00004d |Carolina Speed =background:#DC143C |Columbus Lions =background:#1560BD |Washinton D.C. Armor |Washington DC Armor |DC Armor |D.C. Armor =background:black |Pittsburgh RiverRats |Pittsburgh Riverrats |Erie Riverrats |Erie RiverRats =background:#003F87 |Fayetteville Force |Fayetteville Guard =background:black |Florence Phantoms =background:black |Harrisburg Stampede =background:#005AA9 |New Mexico Wildcats =background:silver |Ogden Knights =background:#00B2EE |Reading Express =background:navy |South Carolina Force =background:#26466D |Utah Valley Thunder =background:#B8860B |Wyoming Cavalry =background:#183058 |Team Alabama =background:#C10001 |Team Arkansas =background:#960103 |Team Florida =background:#FD4602 |Team Michigan =background:#00035E |Team Tennessee =background:#FEB71F |Team Texas =background:#E50000 |Abilene Ruff Riders =background:#BC0203 |Alaska Wild =background:#CD0000 |Billings Outlaws =background:#104E8B |Bloomington Extreme =background:#0D4253 |Colorado Ice =background:#00204F |Corpus Christi Hammerheads =background:#E00 |El Paso Generals =background:#00004d |Fairbanks Grizzlies =background:#3232CC |La Crosse Spartans = background:#324C3F |Maryland Maniacs =background:black |Muskegon Thunder =background:#5B92E5 |Odessa Roughnecks =background:#283A90 |Omaha Beef =background:black |River City Rage |RiverCity Rage =background:black |Rochester Raiders =background:black |Saginaw Sting |Western Pennsylvania Sting |Miami Sting =background:#21441E |San Angelo Stampede Express =background:#8C1717 |Sioux City Bandits =background:#E3170D |Sioux Falls Storm =background:#BF311B |Wichita Wild =background:#F08512 |Bluegrass Warhorses =background:#d82427 |Marion Blue Racers =background:#081C63 |Cincinnati Commandos =background:#424A25 |Indianapolis Enforcers =background:#00008B |Miami Valley Silverbacks |Dayton Silverbacks =background:#03644A |Chicago Knights =background:black |Fort Wayne Firehawks |Fort Wayne FireHawks = background:black |Marion Mayhem = background:#00004D |Northern Kentucky River Monsters=background:black |Florida Tarpons =background:#003F87 |Canton Cougars =background:black |Johnstown Generals =background:#10274c |Kentucky Drillers =background:black |Huntington Hammer =background:#0021A5 |Rome Rampage =background:#E00 |Lehigh Valley Steelhawks =background:black |Chicago Slaughter =background:black |Nebraska Danger =background:#001431 |Allen Wranglers =background:#001E44 |Bricktown Brawlers =background:#90191F |West Texas Roughnecks =background:#10499C |Arizona Adrenaline =background:black |Seattle Timberwolves =background:##551A8B |Wenatchee Valley Venom =background:black |Carolina Aviators =background:#000080 |Tennessee Rail Runners =background:black |Mississippi Hound Dogs =background:#000050 |Lakeland Raiders =background:black |Erie Storm |Erie Explosion =background:black |Corpus Christi Fury =background:#003162 |Northern Kentucky Monsters =background:#339 |Chicago Pythons =background:black |Kane County Dogs |Kane County Dawgs =background:#B22222 |Chicago Blitz =background:black |Evansville Rage =background:black |Owensboro Rage =background:#69359C |Port Huron Patriots =background:#E32636 |Detroit Thunder =background:purple |Dayton Sharks =background:#0073CF |Kentucky Extreme |Kentucky eXtreme |Kentucky Xtreme =background:black |Lincoln Haymakers =background:#000080 |Kansas City Renegades =background:black |Bloomington Edge =background:#002C56 |Dodge City Law =background:black |Kansas Koyotes =background:#0047AB |Mid-Missouri Outlaws =background:black |Oklahoma Defenders =background:#000050 |Salina Bombers =background:black |Texas Revolution =background:#0e3386 |Cedar Rapids Titans =background:black |Cheyenne Warriors =background:black |Bemidji Axemen =background:#003153 |Alabama Hammers =background:#074512 |Albany Panthers =background:black |Nashville Venom =background:#419639 |Richmond Raiders =background:#243D8D |Trenton Freedom =background:#2B378B |Georgia Fire =background:red |Amarillo Venom =background:#DC002B |New Mexico Stars =background:red |Rio Grande Valley Sol =background:navy |San Angelo Bandits =background:black |West Texas Wildcatters =background:black |Cape Fear Heroes =background:#00009C |York Capitals =background:#000060 |Maribor Generals =background:green |#default = background: #dcdcdc }} {{#if:|{{#ifeq:This is the discussion/talk-page for: Template:Str len. Template:Permprot Template:Central Template:Tfdend

Contents

[edit] Merge the str len templates

Template:Tick Done

I think we should merge {{str len}}, {{strlen}} and {{str len full}}. But not right away, this needs some testing and discussion first.

First a reminder to everyone: For most usage cases it is much easier and much less server costly to use {{str ≥ len}} or one of its sister templates.

Anyway, regarding this merge suggestion:

{{str len}}: Has the best name. But it can only count up to 80 in length. And it doesn't fail gracefully, since it produces an error message for strings longer than 80. And it counts the whitespace that surrounds its input, thus {{str len| a }} returns 3 instead of 1.

{{strlen}}: Can only count up to 64 in length. Returns 64 for strings that are too long, which is okay.

{{str len full}}: I think this is the best one, it on average uses the least resources and it can count up to 500 in length. It returns 500 for strings that are too long, which is okay. But it is brand new so it needs a little more testing before we can trust it. (I created it today. Just finished testing it, now going to document it.)

Some week from now when I hope some more users have tested Template:Tlf and we have studied the other templates that depend on these templates, then I think we should move Template:Tlf to Template:Tlf and redirect Template:Tlf there.

Below are the results of the "NewPP limit reports" for each template with different input. I executed them each alone on an otherwise empty page. Those reports are inserted by the Wikipedia servers and can be found if you "view the source" of a generated page in your web browser. They show some data about how much server resources the templates on a page cost. (It works on previews too, so no need to save a page when doing tests like this.)

NewPP limit reports

{{str len|a}}:
Preprocessor node count: 31/1000000
Post-expand include size: 18/2048000 bytes
Template argument size: 11/2048000 bytes

{{strlen| a }}:
Preprocessor node count: 649/1000000
Post-expand include size: 4162/2048000 bytes
Template argument size: 387/2048000 bytes

{{str len full| a }}:
Preprocessor node count: 99/1000000
Post-expand include size: 641/2048000 bytes
Template argument size: 127/2048000 bytes

******************************************

{{str len|60-characters...}}:
Preprocessor node count: 1329/1000000
Post-expand include size: 8044/2048000 bytes
Template argument size: 14926/2048000 bytes

{{strlen| 60-characters... }}:
Preprocessor node count: 59/1000000
Post-expand include size: 624/2048000 bytes
Template argument size: 682/2048000 bytes

{{str len full| 60-characters... }}:
Preprocessor node count: 147/1000000
Post-expand include size: 1486/2048000 bytes
Template argument size: 1828/2048000 bytes

******************************************

Worst case for each string length template:

{{str len|80-characters...}}:
Preprocessor node count: 1769/1000000
Post-expand include size: 13924/2048000 bytes
Template argument size: 26306/2048000 bytes

{{strlen| a }}:
Preprocessor node count: 649/1000000
Post-expand include size: 4162/2048000 bytes
Template argument size: 387/2048000 bytes

{{str len full| 499-characters... }}:
Preprocessor node count: 176/1000000
Post-expand include size: 10017/2048000 bytes
Template argument size: 17740/2048000 bytes

******************************************

Too long strings:

{{str len|501-characters...}} = "String longer than max string length of 80"
Preprocessor node count: 1781/1000000
Post-expand include size: 14470/2048000 bytes
Template argument size: 161534/2048000 bytes

{{strlen| 501-characters... }} = "64"
Preprocessor node count: 19/1000000
Post-expand include size: 1006/2048000 bytes
Template argument size: 1509/2048000 bytes

{{str len full| 501-characters... }} = "500"
Preprocessor node count: 13/1000000
Post-expand include size: 1008/2048000 bytes
Template argument size: 1006/2048000 bytes

As can be seen above, they all cost very differently depending on what input they get.

Template:Tlf and Template:Tlf both use very little resources when they get too long strings. But Template:Tlf uses a lot of resources in spite that it just returns an error message.

--David Göthberg (talk) 14:38, 26 March 2009 (UTC)

I don't really care what happens with the naming. If Template:Tlf can do more with fewer resources, then great. The error message can probably be eliminated or changed since there aren't that many things that depend on this particular behavior and they could probably be patched at the same time. However, I believe some of the other string functions do strictly depend on the fact that white space counts, so changing that behavior may be more burdensome. If you can plan out a way to seamlessly replace str_len with str_len_full, including fixing any dependencies in other templates, then I would have no objection to that. Dragons flight (talk) 05:51, 27 March 2009 (UTC)
Thanks for the heads up on the whitespace. And I see on your talk page that you consider counting whitespace to be a feature and not a bug. So I have now carefully checked all usage of {{str len}} and {{strlen}}, but none of the cases used whitespace or the error messages. So I have now changed all cases to use {{str len full}} instead.
But I converted {{str index}} to instead use {{str ≥ len}}, since that is exactly the kind of case where using Template:Tlf is much better. For instance {{italictitle}} uses these string templates, and the updates I did today made Template:Tlf cost less than half as much to parse as before. So now it "only" costs as much as a very large navbox...
Now I can move Template:Tlf to Template:Tlf. There's two ways I can do that:
1: First delete Template:Tlf, then move Template:Tlf there, then restore the old versions of Template:Tlf to merge the edit histories. (The dates in their edit histories do not overlap, so it won't be confusing.)
2: I can first move Template:Tlf to a new name, if you want to keep it?
--David Göthberg (talk) 07:07, 29 March 2009 (UTC)
I'm fine with delete/merge. At the end of the day it is the functionality that counts more than how it is accomplished. I do worry that having string functions that automatically trim whitespace is going to bite some programmer some day, but whatever. My main interest is in providing an stopgap solution and a demonstration that having real StringFunctions would be A Good Thing. Dragons flight (talk) 07:16, 29 March 2009 (UTC)
Okay, so a delete+move it is.
In most cases the whitespace is just a nuisance. But yeah, there are some situations where one need to handle whitespace. I am thinking of doing some changes to {{italictitle}}, and that will need some string functions that actually use whitespace. But I will know more about that when I have analysed it more.
Ah, so that is your motivation! My motivation is mostly that this is interesting programming. And that we needed the {{str ≥ len}} for some of the small article message boxes.
Oh, and before I go on and totally rework the other string templates I have to say this: Thanks Dragons flight and everyone else who have done the earlier versions of these templates, without the stuff you discovered/invented I could not have done the stuff I am doing now. I would never have realised we could "abuse" padleft like this! :))
--David Göthberg (talk) 19:28, 29 March 2009 (UTC)
Template:Tick Done - And I changed all usage out there to {{str len}}, and deleted most of the subpages of {{str len full}} and {{strlen}} since they now became unused redirects. But I left the redirect from {{strlen}} to keep its edit history. And I left the redirect from {{str len full}} for now, but we should perhaps delete that one.
--David Göthberg (talk) 14:46, 30 March 2009 (UTC)

[edit] Why such complexity is used

This Template:Str_len is a clever, but complicated, way to overcome the lack of a builtin string-length function, back in 2009. The logic repeatedly uses parser-function {{padleft:{{{1}}}|n}} (to pad zeroes left on parameter 1), until the padded strings no longer match the original string, hence counting the length when those strings last matched each other, quickened by counting length in hundreds, tens and ones. This has been a desperate attempt to compensate for needing a quick, internal string-length function. Most software systems have internal character-handling functions, such as for string-length and substring-extraction, but Wikipedia's MediaWiki (1.6) software has been lacking such capability for many years. There was an attempt in 2007-2008 to gain approval to activate several typical string parser-functions (such as {{#len:xxxx}} length), but they were denied, even though they would have been much more efficient than the way {Str_len} uses {padleft:}, so many times, to eventually match the length of the string. If you think this whole situation is nutzoid, you are not alone. Many people have tried to get efficient string functions authorized for inclusion in Wikipedia's MediaWiki software, so the issues are still being debated. The role caused by bureaucracy, or committee, delays is not exactly known. Meanwhile, the complexity within {Str_len} is intended to quickly detect string length, by separation of total length, such as 236, as 2 hundreds, 3 tens and 6 ones (200+30+6), finding 300 was too long, then 40 was too long, and 7 was too long. The separation then uses Template:Str_len/core. That is much faster (and shorter) than having 237 simple if-expressions to compare padding ...234, 235, 236, and find 237 was 1 character too long. The complexity is used to quicken the process of detecting any string length, up to 500 long, and that is why a 2nd template is needed, as {Str_len/core}. -Wikid77 (talk) 01:13, 17 November 2010 (UTC)

[edit] Shorter algorithms to determine length

05-Dec-2010: The subtemplate Template:Str_len/core has used nested if-else-expressions to compare lengths in successive multiples of 100s, 10s and ones. That approach has led to many levels of nesting for the if-else logic. Instead, a #switch could be used to branch to the first matching condition (listed in reverse order), where each #switch is only 1 level deep compared to nested if-else logic over 7 levels deep. For example, to get the hundreds digit, then use a #switch branch as follows.

SWITCH LOGIC to find hundreds:
{{#switch: x{{{1}}}
  | x{{{{{|safesubst:}}}padleft:{{{1|}}}| 400 }} = 4
  | x{{{{{|safesubst:}}}padleft:{{{1|}}}| 300 }} = 3
  | x{{{{{|safesubst:}}}padleft:{{{1|}}}| 200 }} = 2
  | x{{{{{|safesubst:}}}padleft:{{{1|}}}| 100 }} = 1
  | #default= <!--return nothing to avoid a leading 0-->
}}

Compare the switch (above) to the nested if-else logic for the hundreds case, below.

IF-ELSE LOGIC to find hundreds:
{{{{{|safesubst:}}}#ifeq: x{{{1}}} | x{{{{{|safesubst:}}}padleft:{{{1}}}|100}}
| {{{{{|safesubst:}}}#ifeq: x{{{1}}} | x{{{{{|safesubst:}}}padleft:{{{1}}}|200}}
  | {{{{{|safesubst:}}}#ifeq: x{{{1}}}|x{{{{{|safesubst:}}}padleft:{{{1}}}|300}}
    | {{{{{|safesubst:}}}#ifeq:x{{{1}}}|x{{{{{|safesubst:}}}padleft:{{{1}}}|400}}
      | 4
      | 3
      }}
    | 2
    }}
  | 1
  }}
|<!--Don't return 0, since tens/ones don't want a leading 0-->
}}

The switch-logic uses only 1 level of nesting, compared to the 4 levels of if-else logic needed to handle strings above 400. The switch-logic is also shorter because it has only 1 instance of "x{{{1}}}". When using a binary search, then more levels of nesting would be needed. However, simply dividing a search into 2 parts would increase nesting from 1 to only 2 levels, as in the example, below, to find the tens digit, with comparing as above/below 50.

LOGIC to find tens:
{{{2}}}{{{{{|safesubst:}}}
#ifeq:x{{{1}}}|x{{{{{|safesubst:}}}padleft:{{{1}}}|{{{2}}}50}}
| {{#switch: x{{{1}}}
  | x{{{{{|safesubst:}}}padleft:{{{1|}}}| {{{2}}}90 }} = 9
  | x{{{{{|safesubst:}}}padleft:{{{1|}}}| {{{2}}}80 }} = 8
  | x{{{{{|safesubst:}}}padleft:{{{1|}}}| {{{2}}}70}} = 7
  | x{{{{{|safesubst:}}}padleft:{{{1|}}}| {{{2}}}60}} = 6
  | #default= 5 <!--when >= 50 and none of the above-->
  }}
| {{#switch: x{{{1}}}
  | x{{{{{|safesubst:}}}padleft:{{{1|}}}| {{{2}}}40 }} = 4
  | x{{{{{|safesubst:}}}padleft:{{{1|}}}| {{{2}}}30 }} = 3
  | x{{{{{|safesubst:}}}padleft:{{{1|}}}| {{{2}}}20}} = 2
  | x{{{{{|safesubst:}}}padleft:{{{1|}}}| {{{2}}}10}} = 1
  | #default= {{{{{|safesubst:}}}#if:{{{2|}}}|0}}
  }}
}}<!--endif-->

Compare the logic (above) to the 7 levels of nested if-else used by {Str_len/core} to find the tens digit, below (omitting most "safesubst:" for brevity).

IF-ELSE LOGIC to find tens:</nowiki>
{{{2|}}}{{
{{{|safesubst:}}}#ifeq: x{{{1|}}} | x{{padleft:{{{1|}}}| {{{2|}}}10}}
| {{#ifeq: x{{{1|}}} | x{{padleft:{{{1|}}}| {{{2|}}}20}}
  | {{#ifeq: x{{{1|}}} | x{{padleft:{{{1|}}}| {{{2|}}}30}}
    | {{#ifeq: x{{{1|}}} | x{{padleft:{{{1|}}}| {{{2|}}}40}}
      | {{#ifeq: x{{{1|}}} | x{{padleft:{{{1|}}}| {{{2|}}}60}}
        | {{#ifeq: x{{{1|}}} | x{{padleft:{{{1|}}}| {{{2|}}}80}}
          | {{#ifeq: x{{{1|}}} | x{{padleft:{{{1|}}}| {{{2|}}}90}}
            | 9
            | 8
            }}
          | {{#ifeq: x{{{1|}}} | x{{padleft:{{{1|}}}| {{{2|}}}70}}
            | 7
            | 6
            }}
          }}
        | {{#ifeq: x{{{1|}}} | x{{padleft:{{{1|}}}| {{{2|}}}50}}
          | 5
          | 4
          }}
        }}
      | 3
      }}
    | 2
    }}
  | 1
  }}
| {{{{{|safesubst:}}}#if:{{{2|}}}|0}} <!--return 0 if >=100-->
}}</nowiki>

Comparisons of the logic (above) show some improved algorithms for the coding of subtemplate {Str_len/core}. -Wikid77 (talk) 10:54, 5 December 2010 (UTC)

Hi Wikid77. As you might know I coded this optimised Template:Tld template. I based it on older Template:Tld templates made by other users and I also got input from other users, so as usual it really was a teamwork.
Unfortunately your code would cost more server resources to run. Here is what we knew when we designed this template:
1: Calling the magic word Template:Tld is very costly (heavy on the Wikimedia servers). This was told to us several times by the guys managing the Wikimedia servers and/or the guys coding the server software, I don't remember which. So we want to minimize the number of calls to padleft. That's what this is all about!
2: Parsing several if-cases cost almost as little as parsing a switch-case. Usually what makes the difference is what code is used in each comparison line inside the switch or if-case.
3: The great majority of usage cases out there checks very short strings. That is, it is way more common that the input to Template:Tld is 5 characters long than that it is 205 characters long.
So, let's look at your first code suggestion above. If we feed it a string that is 0-99 characters, your code uses four padleft calls. Since your switch-case will first check if the string is >= 400, then >= 300 and so on. While the old code (second code example above) only costs one padleft call to check that string. So in the majority of the usage cases out there your checking is four times as costly for the servers to perform. And when using padleft and a switch-case you can't check for short strings first, so we have to use if-cases to optimise it. Sorry.
And your second code suggestion above (third code example above) have the same problem. Your code costs more padleft calls when checking short strings. Remember, Template:Tld is mostly used to check short strings. For instance, for strings that is less than 20 characters long your code costs five padleft calls, while the old code only costs 1-2 padleft calls. Below is my full comparison of your search and the old search. See the documentation at {{str len/core}} for more on what these diagrams mean.
David's search, code example 4 above:

1--2--3--4--6--8--9
            |  |
            5  7

0 1 2 3 4 5 6 7 8 9 = Values to find.
1+2+3+4+6+6+7+7+7+7 = 50 comparisons to find all values once.


Wikid's search, code example 3 above:

5--9--8--7--6
|
4--3--2--1

0 1 2 3 4 5 6 7 8 9 = Values to find.
5+5+4+3+2+5+5+4+3+2 = 38 comparisons to find all values once.


Binary search:

4-----6--8--9
|     |  |
2--3  5  7
|
1

0 1 2 3 4 5 6 7 8 9 = Values to find.
3+3+3+3+3+3+4+4+4+4 = 34 comparisons to find all values once.
The diagram shows that a binary search of course is the most efficient on average. And Wikid's search comes fairly close to the binary search, except for short input strings where Wikid's search is much less efficient. But, for short input my search (David's) is more efficient than both the others. And short input is much more common so in total my search costs less server resources. Back when I coded this template the wast majority of usage cases were strings that were really short, most were below 20 characters long and only rarely longer than 39 characters. I guess that is still true.
So this template probably already is as optimised as is possible with template code. (Disclaimer: I kind of retired from Wikipedia in spring 2010 so I might have missed out some new functionality that might be useful to improve this.)
Oh, and since I am more or less retired I won't notice any comments here unless someone pokes me on my talkpage.
--David Göthberg (talk) 23:54, 24 January 2011 (UTC)
30-Jan-2011: The new algorithm below (under "#Optimizing for real string lengths") actually runs somewhat faster than the "already is as optimised as is possible" version in Template:Str_len; in fact, it runs almost 2x times (twice) as fast for actual strings of Wikipedia titles. The reason the new algorithm is so much incredibly faster (and shorter) is because it seeks to match the most-common string lengths, first, rather than treat every length having an end-digit "3" by using the same search order. In fact, almost no titles are 3 characters long, whereas many are 13 or 23, and treating digit "3" the same was a waste of search steps. The basic logic failure, above, was erroneously thinking that optimization could be done independent of the actual data being optimized. Case in point: imagine a string-length template which processed any string using 6 comparisons, but was used on data where 99% of strings were 19 characters long: changing to check for "19" (as the first comparison) would optimize performance as just 1 comparison in 99% of cases. That concept was extended, in the new algorithm below, to check for lengths in prioritized order, to match the most-likely real-world lengths sooner. If the world changed tomorrow, to rename most films to have 3-letter titles, then the algorithm would perform badly, and would need to be re-optimized for the actual data being processed. -Wikid77 10:52, 30 January 2011 (UTC)
  • That use of nested if-else-else-else seeks to optimize by reducing the use of {padleft} without considering ways to optimize the expansion-depth levels. Consequently, {str_len} needs 9 expansion levels for lengths 1-9, 10 levels for an 11-character string, but 13 expansion levels for a URL of 61 characters. By using other algorithms, the expansion levels can be reduced. -Wikid77 21:39, 27 January 2011 (UTC)

[edit] Strlen_short nests 3 levels when str_len uses 13

Expansion depth tests during 2010, of the nesting of Template:Str_len, show it used 9 expansion levels to count string lengths 1-9, 10 levels for an 11-character string, but 13 if-else expansion levels to find the length of a URL of 61 characters. Str_len always uses 4 or more calls to {padleft}, and can nest up to 18 levels for long strings. By using other algorithms, the expansion levels can be reduced. For example, Template:Strlen_short simply checks against a simple, prioritized linear search, never increasing beyond 3 levels of expansion depth nesting, for strings of 0-50 characters. For string lengths of 5,6,7 or 4, Strlen_short uses at most 4 calls to {padleft}, but it could be reduced to just 1 call to {padleft} for the most common length (assumed 5). Strlen_short can also be subst'd, as in {{subst:strlen_short|ABCDEF}} storing just the digit "6". -Wikid77 21:39, 27 January 2011 (UTC)

[edit] Optimizing for real string lengths

30-Jan-2011: The Template:Strlen_quick was created, as a faster (and shorter) alternative to {str_len}, by optimizing for real string data as used in articles. Using the actual string searches, from existing Wikipedia articles, it has been possible to determine the most-likely string lengths, such as 17/18 characters for titles. Then, a template is optimized to match those lengths faster: for example, suppose the top 1,000 articles all used an infobox code of 9 letters, in that case, checking for length 9, first, could avoid checking other lengths. In the case of 353,000 articles using {{Italic_title}}, the string lengths range from 2-99 letters, with the most-common lengths between 16-19 long, and 88% of all titles < 30 long. The distribution of lengths of titles has been as follows:

  • 84% > 10, 12% < 10, 51% in 10-19, 25% in 20-29, 7% in 30-39, 1.7% in 40-49, 0.6% >50.

For lengths 0-9, the increase is dramatic: almost no titles are 1 or 2 characters, a few are 3, some are 4, then more have lengths 5, 6, 7, 8, with 9 as 19x times more common than length 3. In trying to match title-length quickly, then check for the most-common first, as length 9-to-1 in reverse order.
Among lengths 10-19, the most common are at 17/18, then fewer when farther away, with 10 being the least-frequent length among those. Above 20, the lengths decrease in frequency, 21-to-29, as the reverse of 9-1, so checking 21, first, is 3x times more likely to match than 29. Among 30-39, the titles are quite rare, with 31 being as rare as length 5, and 39 being 3x times more rare, as occurring only 43-per-10,000 titles. By optimizing for the actual lengths of titles, those lengths can be matched perhaps twice as quickly. A pure binary search would give unfair advantage to rare lengths, so the string-search has been prioritized in favor of the more common lengths.

Tests of Template:Strlen_quick show that it, in fact, processes actual title lengths about 2x times (twice) as fast as the binary-search markup logic which has been used in {str_len} and {str_len/core}. More later. -Wikid77 10:52, 30 January 2011 (UTC)

[edit] String length of appeared text instead of raw markup

Right now this template/module checks the actual markup length instead of the appeared text, e.g. {{Str len|[[I love you|y]]}} gives "16" instead of "1". Is there any way to gain the latter result? Thanks. -- Sameboat - 同舟 (talk · contri.) 02:32, 5 February 2016 (UTC)|<small|}}}}{{#if:||}}{{#if:||{{#if:|}}}}

Personal tools