Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
ucfirst is gone, replaced by tc.
Browse files Browse the repository at this point in the history
  • Loading branch information
coke committed Jul 25, 2012
1 parent e7f863c commit f0f0053
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Pugs/src/Pugs/CodeGen/PIR/Prelude.hs
Expand Up @@ -73,7 +73,7 @@ preludeStr = unlines
, " lc(substr $str, 0, 1) ~ substr $str, 1, chars($str) - 1;"
, "}"
, ""
, "sub ucfirst (Str $str) returns Str is builtin is primitive {"
, "sub tc (Str $str) returns Str is builtin is primitive {"
, " uc(substr $str, 0, 1) ~ substr $str, 1, chars($str) - 1;"
, "}"
, ""
Expand Down
4 changes: 2 additions & 2 deletions Pugs/src/Pugs/Prim.hs
Expand Up @@ -135,7 +135,7 @@ op1 "Str::split" = op1Cast (castV . words)
op1 "lc" = op1Cast (VStr . map toLower)
op1 "lcfirst" = op1StrFirst toLower
op1 "uc" = op1Cast (VStr . map toUpper)
op1 "ucfirst" = op1StrFirst toUpper
op1 "tc" = op1StrFirst toUpper
op1 "capitalize" = op1Cast $ VStr . (mapEachWord capitalizeWord)
where
mapEachWord _ [] = []
Expand Down Expand Up @@ -1996,7 +1996,7 @@ initSyms = seq (length syms) $ do
\\n Str pre quotemeta safe (Str)\
\\n Str pre lcfirst safe (Str)\
\\n Str pre uc safe (Str)\
\\n Str pre ucfirst safe (Str)\
\\n Str pre tc safe (Str)\
\\n Str pre capitalize safe (Str)\
\\n Str pre crypt safe (Str, Str)\
\\n Str post ++ safe (rw!Str)\
Expand Down
1 change: 1 addition & 0 deletions t/spectest.data
Expand Up @@ -365,6 +365,7 @@ S32-str/pos.t
S32-str/quotemeta.t
S32-str/rindex.t
S32-str/substr.t
S32-str/tc.t
S32-str/trim.t
S32-str/ucfirst.t
S32-str/uc.t
Expand Down

0 comments on commit f0f0053

Please sign in to comment.