could I get the string "abc" from a string of "abc.dat" in NCL?

From: LEO_ARIES <Leo_Aries_at_nyahnyahspammersnyahnyah>
Date: Wed, 11 Apr 2007 23:53:02 +0800

hi,all

     I have a small question on the string manipulation in NCL.
     
     Here below is some of my script:

     all_files = systemfunc ("ls " + "*.dat")
     n = dimsizes(all_files)

     do i = 0,n-1
         x =asciiread(all_files(i),-1,"float")
         .....
         wks = gsn_open_wks("eps",all_files(i))
         res = True
         ......
         res_at_gsnLeftString = all_files(i) ? Notice : here is the problem i want to resolve, the last 4 character of the string "all_files(i)"
                                                                    is ".dat", but I don't want them in the resource of "gsnLeftString".
                                                                    Could I have any solution to get all the other character except the ".dat" ?
         plot = .....
     end do
 
     end

Thanks in advance

Lin
  

LEO_ARIES
2007-03-27

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Apr 11 2007 - 09:53:02 MDT

This archive was generated by hypermail 2.2.0 : Tue Apr 17 2007 - 15:41:32 MDT