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

Last change on this file since 11 was 11, checked in by fmguler, 16 years ago

FMG VEN kütüphanesi - ilk import

File size: 1.0 KB
RevLine 
[11]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.