1
0
mirror of https://github.com/twiglet/cs2j.git synced 2025-01-18 13:15:17 +01:00

sync from RS

This commit is contained in:
Kevin Glynn 2012-09-03 18:36:31 +02:00
parent 7d27b211a6
commit be1fe6d476
5 changed files with 37 additions and 2 deletions

View File

@ -142,6 +142,22 @@
<Name>Max</Name>
<Return>System.Number</Return>
</Method>
<Method>
<Imports />
<Java>Math.pow(${a},${b})</Java>
<Params>
<Param>
<Type>System.Double</Type>
<Name>a</Name>
</Param>
<Param>
<Type>System.Double</Type>
<Name>b</Name>
</Param>
</Params>
<Name>Pow</Name>
<Return>System.Double</Return>
</Method>
<Method>
<Imports />
<Java>Math.round(${d})</Java>

View File

@ -46,6 +46,18 @@
<Name>GetString</Name>
<Return>System.String</Return>
</Method>
<Method>
<Imports />
<Java>new String(${buf}, ${this:16}.getString())</Java>
<Params>
<Param>
<Type>System.Byte[]</Type>
<Name>buf</Name>
</Param>
</Params>
<Name>GetString</Name>
<Return>System.String</Return>
</Method>
</Methods>
<Properties>
<Property>

View File

@ -61,6 +61,10 @@ public class CSList<T> implements ICollection<T>, IEnumerable<T>, Collection<T>,
}
}
public CSList(Collection<T> c){
myList = new ArrayList<T>(c);
}
public Iterator<T> iterator() {
return myList.iterator();

View File

@ -56,7 +56,7 @@ public class MailAddress {
}
public InternetAddress toInternetAddress() throws UnsupportedEncodingException {
return new InternetAddress(address, displayName);
return new InternetAddress(address, displayName, "utf-8");
}
/**

View File

@ -128,7 +128,10 @@ public class StringSupport {
}
public static String Trim(String in, char[] filters, boolean trimStart, boolean trimEnd)
{
{
if(in == null){
return null;
}
// Locate first non-trimmable index
int firstIdx = 0;
if (trimStart) {