Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
1 answer
267 views

DeleteCases not working as expected

I am trying to reproduce the example of Data Cleaning from here. I had to make a slight change in input 13 to ...
Thadeu Freitas Filho's user avatar
5 votes
1 answer
432 views

What is the point of StringForm?

I never really understood the point of StringForm returning a StringForm rather than a String...
Alan's user avatar
  • 13.8k
20 votes
2 answers
521 views

Unexpected behaviour when pattern matching with Longest

I came across some unexpected behaviour today when using the Longest function when trying to do some pattern matching. ...
A Simmons's user avatar
  • 412
4 votes
1 answer
90 views

Why was StringRepeat designed so that StringRepeat[s, 0] throws an error?

Update In version 13.2 StringRepeat[" ", 0] produces an empty string. I'm wondering about the rationale behind the design decision that leads to the ...
David Zwicker's user avatar
7 votes
4 answers
557 views

Strange answer from StringReplace

I have a list of strings and I would check if there is an empty string element, that's "", because I need to replace it with a "0". I try the following ...
bobknight's user avatar
  • 2,047
17 votes
3 answers
2k views

Specifying string patterns in DeleteCases

It seems that DeleteCases is not compatible with string patterns, at least directly (see, for example, this question). Is this true? If so, why is this the case? ...
Andrew's user avatar
  • 10.5k