Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
10
Task/Substring/Mathematica/substring.math
Normal file
10
Task/Substring/Mathematica/substring.math
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
n = 2
|
||||
m = 3
|
||||
StringTake["Mathematica", {n+1, n+m-1}]
|
||||
StringDrop["Mathematica", n]
|
||||
(* StringPosition returns a list of starting and ending character positions for a substring *)
|
||||
pos = StringPosition["Mathematica", "e"][[1]][[1]]
|
||||
StringTake["Mathematica", {pos, pos+m-1}]
|
||||
(* Similar to above *)
|
||||
pos = StringPosition["Mathematica", "the"][[1]]
|
||||
StringTake["Mathematica", {pos, pos+m-1}]
|
||||
Loading…
Add table
Add a link
Reference in a new issue