xpile 0.1.616

Polyglot transpile workbench (Python/C/C++/Rust/Ruchy/Lean ↔ Rust/Ruchy/PTX/WGSL/SPIR-V) with provable contracts at every layer.
1
2
3
4
5
6
7
8
9
10
11
12
13
# PMAT-1014 (sweep #7): the four Latin DIGRAPH triples (DŽDždž / LJLjlj / NJNjnj /
# DZDzdz) have a distinct TITLECASE (Lt) middle form — Python's capitalize()/
# title() map ANY of the three forms to it ('dz'.capitalize() == 'Dz'). The
# PMAT-701 uppercase-expansion derivation gave the all-caps first form
# (dz→DZ, U+01F1) instead of Dz (U+01F2): a silent DIVERGE. A const range-match
# now intercepts the digraphs before the expansion; ß→Ss / fl→Fl expansion and
# ASCII behavior are unchanged.
def cap(s: str) -> str:
    return s.capitalize()


def titl(s: str) -> str:
    return s.title()