Difference between revisions of "Template:Get surname"

From Crews Genealogy Wiki: focusing on the Wiregrass south, and related families
Jump to navigation Jump to search
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
<!-- check first character of last word for (-->{{#ifeq: <!--get first character of last word -->{{#sub: {{#explode: {{{1|}}} | |-1}}| 0|1}} | ( | {{#explode: {{{1|}}} | |-2}} | <!--do the switch-->
+
{{#if: {{#explode: {{#explode: {{{1|}}} | (|-2}} | |-1}}  
{{#switch: {{#sub: {{#explode: {{{1|}}} | |-1}}| 0|1}}
+
|  
  |1
+
{{#switch: {{#explode: {{#explode: {{{1|}}} | (|-2}} | |-1}}
  |2
+
  | jr
  |3
+
| Jr
  |4
+
| jr.
  |5
+
| Jr.
  |6
+
| sr
  |7
+
| Sr
  |8
+
| sr.
  |9 = {{#explode: {{{1|}}} | |-2}}  
+
  | Sr.
 +
  | I
 +
  | i
 +
  | II
 +
  | ii
 +
  | III
 +
  | iii = {{ucfirst:{{lc:{{#explode: {{#explode: {{#explode: {{{1|}}} | (|-2}} | |-2}} |,|0}}}}}}
 +
  | #default= {{ucfirst:{{lc:{{#explode: {{#explode: {{{1|}}} | (|-2}} | |-1}}}}}}
 
}}
 
}}
{{#switch: {{#explode: {{{1|}}} | |-1}}  
+
|
 +
{{#switch: {{#explode: {{{1|}}}| |-1}}
 
  | jr
 
  | jr
 
  | Jr  
 
  | Jr  
Line 20: Line 28:
 
  | sr.
 
  | sr.
 
  | Sr.
 
  | Sr.
 +
| I
 +
| i
 +
| II
 +
| ii
 
  | III
 
  | III
  | iii = {{#explode: {{{1|}}} | |-2}}  
+
  | iii = {{lc:{{ucfirst:{{#explode: {{#explode: {{{1|}}}| |-2}} |,|0}}}}}}
  | #default={{#explode: {{{1|}}} | |-1}}
+
  | #default= {{ucfirst:{{lc:{{#explode: {{{1|}}}| |-1}}}}}}
}} }}<noinclude>{{documentation}}</noinclude>
+
}}
 +
}}

Latest revision as of 12:24, 13 March 2019