Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
20
Task/Substring/Nemerle/substring.nemerle
Normal file
20
Task/Substring/Nemerle/substring.nemerle
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Console;
|
||||
|
||||
module Substrings
|
||||
{
|
||||
Main() : void
|
||||
{
|
||||
string s = "0123456789";
|
||||
def n = 3;
|
||||
def m = 2;
|
||||
def c = '3';
|
||||
def z = "345";
|
||||
|
||||
WriteLine(s.Substring(n, m));
|
||||
WriteLine(s.Substring(n, s.Length - n));
|
||||
WriteLine(s.Substring(0, s.Length - 1));
|
||||
WriteLine(s.Substring(s.IndexOf(c,0,s.Length), m));
|
||||
WriteLine(s.Substring(s.IndexOf(z, 0, s.Length), m));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue