Jump to content

Template talk:Str sub old/doc

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Zero-based?

[edit]

At the time of writing str_sub seems to be zero-based. E.g.{{str_sub|{{REVISIONTIMESTAMP}}|8|2}}:{{str_sub|{{REVISIONTIMESTAMP}}|10|2}} returns "21:24" from "20090623212433", starting at the 9th and 11th character. This could do with documenting. I won't edit the doc myself as I'm not familiar with the template; maybe this is actually a temporary error? Pol098 (talk) 21:29, 23 June 2009 (UTC)[reply]

(Later) this template does indeed use base 0, though it may not have done so consistently in the past. I've added a note to the brief doc. Pol098 (talk) 13:15, 24 June 2009 (UTC)[reply]