Example: tourism industry

Syntax Description - Stata

( ) Extract substringSyntaxDescriptionConformability DiagnosticsAlso seeSyntaxstring matrixsubstr(string matrix s,real matrix b,real matrix l)string matrixsubstr(string matrix s,real matrix b)Descriptionsubstr(s,b,l)returns the substring ofsstarting at positionband continuing for a length ofl, the starting position; the first character of the string isb= >0 is interpreted as distance from the start of the string;b=2 means starting at thesecond <0 is interpreted as distance from the end of string;b= 1 means starting at the lastcharacter;b= 2 means starting at the second from the last the length;l=2 means for two <0 is treated the same asl=0: no characters are.

2substr()— Extract substring Diagnostics In substr(s, b, l) and substr(s, b), if b describes a position before the beginning of the string or after the end, "" is returned.

Tags:

  Descriptions, Stata, Syntax, Syntax description

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Syntax Description - Stata

1 ( ) Extract substringSyntaxDescriptionConformability DiagnosticsAlso seeSyntaxstring matrixsubstr(string matrix s,real matrix b,real matrix l)string matrixsubstr(string matrix s,real matrix b)Descriptionsubstr(s,b,l)returns the substring ofsstarting at positionband continuing for a length ofl, the starting position; the first character of the string isb= >0 is interpreted as distance from the start of the string;b=2 means starting at thesecond <0 is interpreted as distance from the end of string;b= 1 means starting at the lastcharacter;b= 2 means starting at the second from the last the length;l=2 means for two <0 is treated the same asl=0: no characters are.

2 Is interpreted to mean to the end of the (s,b)is equivalent tosubstr(s,b, .)for strings that do not contain binary 0. If thereis a binary 0 to the right ofb, the substring frombup to but not including the binary 0 is arguments are not scalar,substr()returns element-by-element (s,b,l):s:r1 c1b:r2 c2l:r3 c3;s,b, andlr-conformableresult:max(r1,r2,r3) max(c1,c2,c3)substr(s,b):s:r1 c1b:r2 c2;sandbr-conformableresult:max(r1,r2) max(c1,c2)12 substr( ) Extract substringDiagnosticsInsubstr(s,b,l)andsu bstr(s,b), ifbdescribes a position before the beginning of the stringor after the end,""is returned. Ifb+ldescribes a position to the right of the end of the string,results are as if a smaller value forlwere see[M-4]string String manipulation functions


Related search queries