1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question How Removing Last Character Of A String?

Discussion in 'Development' started by Anderson Apdo de Souza, Mar 31, 2017.

  1. Hello!

    How removing last character of a string?

    Sample :


    Requisição : 7062298 7066083 - 7067325 - 7076260 - 7084470 -

    Requisição : 7078230 7078233 - 7078236 - 7078240 - 7078244 - 7078250 - 7078255 - 7078258 - 7078259 - 7078262 - 7078267 - 7078268 - 7078272 - 7079844 - 7079847 - 7079856 - 7079864 - 7079867 - 7080497 - 7080504 - 7080509 - 7083258 - 7083267 - 7083913 - 7085211 - 7085223 - 7085269 - 7086183 - 7088048 - 7088076 - 7088078 -"


    caractere -


    Notice the size of the chain.
     
  2.  
  3. Stefan

    Stefan Active Member

    Code (progress):
    1. cc = substring( cc, 1, length( cc ) - 1 )
     
  4. Rod Anderson

    Rod Anderson Member

    If it's a known constant (ie "-") you could use RIGHT-TRIM.
    Code (progress):
    1. cString = RIGHT-TRIM(cString,"-").
     

Share This Page