長さを気にしないコンテナを使ってみませんstd::string
か?
さて、私は最近、一般的なcsv形式(たとえば、ここではBoostのファイル)で提供されているTZ dbを使用していましたが、同じ形式がBoostソースでも使用されています。
そのデータを使用すると、最大長は28になります。
R> library(RcppBDT) # R package interfacing Boost Date_Time
Loading required package: Rcpp
R> tz <- new(bdtTz, "America/Chicago") # init. an object, using my default TZ
R> tznames <- tz$getAllRegions() # retrieve list of all TZ names
R>
R> length(tznames) # total number of TZ identifiers
[1] 381
R>
R> head(tznames) # look at first six
[1] "Africa/Abidjan" "Africa/Accra" "Africa/Addis_Ababa"
[4] "Africa/Algiers" "Africa/Asmera" "Africa/Bamako"
R>
R> summary(sapply(tznames, nchar)) # numerical summary of length of each
Min. 1st Qu. Median Mean 3rd Qu. Max.
9 13 15 15 17 28
R>
R> tznames[ nchar(tznames) >= 26 ] # looking at length 26 and above
[1] "America/Indiana/Indianapolis" "America/Kentucky/Louisville"
[3] "America/Kentucky/Monticello" "America/North_Dakota/Center"
R>
ヒストグラムも見ることができます。
R> library(MASS)
R> truehist(sapply(tznames, nchar),
+ main="Distribution of TZ identifier length", col="darkgrey")
R>

これは、R-ForgeのRcppBDTパッケージのSVNリポジトリにあるが、パッケージのCRANバージョンにはまだないコードを使用します。