Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: extended function: piece


From   [email protected]
To   [email protected]
Subject   st: extended function: piece
Date   Mon, 8 Dec 2003 15:55:39 +0000

Any reason why piece doesn't appear to allow the length of pieces to be 1?

e.g.
. local subpiece: piece 2 1 of "abcdefghi"
invalid syntax
r(198);

SYNTAX:        piece #piece_number #length_of_pieces of [`]"string"['] [,
nobreak ]

<-- no restriction is mentioned on the STATA help system.

And is piece going to be computationally faster than substr?

cheers
Ade

Adrian Mander MSc PhD, Principal Statistician, GlaxoSmithKline, Mail Code
HW8133, New Frontiers Science Park (South), Harlow, Essex, CM19 5AW. Tel:
01279 63 1203 Fax: 01279 64 4003



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index