Code Examples
A repository of 155 code examples for BeepBeep
BinaryCutString.java
1 package functions.custom;
2 
3 import ca.uqac.lif.cep.functions.BinaryFunction;
4 
5 public class BinaryCutString extends
6  BinaryFunction<String,Number,String>
7 {
8  public BinaryCutString()
9  {
10  super(String.class, Number.class, String.class);
11  }
12 
13  public String getValue(String s, Number n)
14  {
15  return s.substring(0, n.intValue());
16  }
17 }