# encoding: ascii
# api: powershell
# title: LetterDiamondOneliner v2
# description: @Karl
# version: 0.1
# author: Robert Robelo
# license: CC0
# x-poshcode-id: 1041
# x-archived: 2009-04-22T08:05:33
#
# > ...but couldn’t get it smaller than a twitter message length
# 139 chars w/o arg
#
&{param([char]$c)[int]$s=65;$p=$c-$s;$r=,(' '*$p+[char]$s);$r+=@(do{"{0,$p} {1}{0}"-f([char]++$s),(' '*$f++)}until(!--$p));$r;$r[-2..-99]}Z
# trimmed 130 chars w/o arg
&{param([char]$c)$p=$c-($s=65);$r=,(' '*$p+[char]$s);do{$r+="{0,$p} {1}{0}"-f([char]++$s),(' '*$f++)}until(!--$p);$r;$r[-2..-99]}J
# trimmed to 124 chars w/o arg
&{$r=,(' '*($p=[char]$args[0]-($s=65))+[char]$s);do{$r+="{0,$p} {1}{0}"-f[char]++$s,(' '*$f++)}until(!--$p);$r;$r[-2..-99]}J