Skip to content

Conversation

@rocky
Copy link
Member

@rocky rocky commented Apr 20, 2021

@mmatera the thing I don't know about here is what happens when StringTake is given a bad parameter of some form.

@rocky rocky requested a review from mmatera April 20, 2021 21:27
@rocky rocky force-pushed the StringTake-sequence-arg branch from da059a6 to 3866c5c Compare April 20, 2021 21:29
@mmatera
Copy link
Contributor

mmatera commented Apr 20, 2021

Here a couple of examples

In[1]:= StringTake[{2,4},2]

StringTake::strse: 
   String or list of strings expected at position 1 in StringTake[{2, 4}, 2].
 
Out[1]= StringTake[{2,4},2]

In[2]:= StringTake["kkkl",Graphics[{}]] 

StringTake::mseqs: 
   Sequence specification (+n, -n, {+n}, {-n}, {m, n}, or {m, n, s}) or a list
     of sequence specifications expected at position 2 in 
    StringTake[kkkl, -Graphics-].

Out[2]= StringTake[kkkl, Graphics[{}]]

In[3]:= StringTake["als", 10] 

StringTake::take: Cannot take positions 1 through 10 in "als".

Out[3]= StringTake[als, 10]

@rocky
Copy link
Member Author

rocky commented Apr 21, 2021

StringTake["als", 10]

@mmatera thanks for the information. I think things are synchronized now to as close as we can get.

@rocky rocky force-pushed the StringTake-sequence-arg branch 3 times, most recently from 1fde55d to bd1d821 Compare April 21, 2021 03:01
Thanks mmatera!
@rocky rocky force-pushed the StringTake-sequence-arg branch from bd1d821 to ae1f84d Compare April 21, 2021 03:02
Copy link
Contributor

@mmatera mmatera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rocky rocky merged commit 3d32230 into master Apr 22, 2021
@rocky rocky deleted the StringTake-sequence-arg branch April 22, 2021 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants