Re: How to find code in the racket distro

Sam Caldwell <[email protected]>
Newsgroups gmane.comp.lang.racket.user,gmane.lisp.scheme.plt
Message-ID <CALuKBHtEYZegOcb-N+-N+WpN8o0n5tXdHO4+5inCcjZ=Y7i8PA@mail.gmail.com>
Using github search (going to https://github.com/racket/racket and then
typing in string-titlecase to the 'search this repository' bar) I was able
to quickly find this snippet in string.c:

scheme_add_global_constant("string-titlecase",
    scheme_make_immed_prim(string_titlecase,
   "string-titlecase",
   1, 1),

which suggests to me that string-titlecase is the name of something called
string_titlecase.

I then searched the repository for "string_titlecase" which pointed me back
to string.c

Searching the string.c file for string_titlecase shows that it is a
particular incantation of string_recase which is also in the file.

I'm not sure if finding other bits of the implementation would be as
seamless but it's worth a try next time you're looking for something!

- Sam Caldwell

On Tue, Jun 20, 2017 at 2:00 PM, Stephen De Gabrielle <
[email protected]> wrote:

> Hi
>
> There  was a recent question on the list about how to capitalise the first
> letter of a string.
>
> There were a number of good approaches, but I thought I would try look for
> the implementation of string-titlecase.
>
> I found it surprisingly difficult despite having the search for code
> functionality and the syntax highlighting.  In the end I gave up and went
> to bed. :(
>
> Does anyone have any suggestions about how to find definitions of core
> functions?
>
> Kind regards,
>
> Stephen
>
>
> --
> Kind regards,
> Stephen
> --
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
For more options, visit https://groups.google.com/d/optout.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.