MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: trimming a string (with Java)


Another way to achieve your goal is to use the trim method in  Java
via J/Link:

Needs["JLink`"]

InstallJava[]

aString=JavaNew["java.lang.String","   Have a great day.  "]

aString[trim[]]

I have a web site with various examples of integrating Java with
Mathematica, including one that makes use of the Java regex package
(regular expressions) that is useful for more complicated string
manipulations (apparently regular expressions will soon be built into
Mathematica)

http://www.higgins.ucdavis.edu/Jlink.php

Cheers,

Brian


  • Prev by Date: Re: Linear Programming
  • Next by Date: Fast multiplication of polynomials mod p
  • Previous by thread: Re: Re: Linear Programming
  • Next by thread: Fast multiplication of polynomials mod p