All Questions
Tagged with language-design string-manipulation
6 questions
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
...
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...
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.
...
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 ...
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
...
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? ...