source: trunk/fmgVen/src/net/fmg/ven/arac/Cevir.java @ 22

Last change on this file since 22 was 22, checked in by fmguler, 14 years ago

Refs #3 - The new com.fmguler.ven package is created. Project netbeans encoding is changed from windows 1254 to UTF-8. Existing Turkish source files are transformed to UTF-8. Project license is set as apache 2.0 and netbeans license template is created (which is copied from netbeans apache20 and project name is added). To install this template to netbeans, you should import the etc/license/license-ven-apache20.txt to netbeans->tools->templates ->licenses.

The new Ven class is created having the new license template. Now the translation task is to be done.

File size: 1.0 KB
Line 
1/*
2 * Cevir.java
3 *
4 * Created on December 18, 2006, 10:51 AM
5 * (4.12.06 tarihli SpringDaoDeneme çalışmasından derlenmiştir)
6 *
7 * Ven - Ayar Yerine Gelenek veritabanı erişim nesnesi
8 */
9
10package net.fmg.ven.arac;
11
12import java.util.Locale;
13
14/**
15 * Deve harflerle yazılmış metni veritabanı şekline çevirir
16 * @author Fatih Mehmet Güler
17 */
18public class Cevir {
19   
20    /** Creates a new instance of Cevir */
21    public Cevir() {
22    }
23   
24    public static String vt(String deve){
25        if (deve.equals("")) return "";
26        StringBuffer sonuc = new StringBuffer();
27        sonuc.append(deve.substring(0,1).toLowerCase(Locale.ENGLISH));
28        for (int i = 1; i < deve.length(); i++) {
29            String ki = deve.substring(i,i+1);
30            String kiKucuk = ki.toLowerCase(Locale.ENGLISH);           
31            if (!ki.equals(kiKucuk)){
32                sonuc.append("_"+kiKucuk);
33            }else sonuc.append(ki);                           
34        }
35        return sonuc.toString();
36    }
37   
38}
Note: See TracBrowser for help on using the repository browser.