Lyric.cpp 958 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /**
  2. * Lyric.cpp
  3. * Copyright (C) 2010 HAL, 2012 kbinani
  4. *
  5. * This file is part of v.Connect.
  6. *
  7. * v.Connect is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU GPL Lisence.
  9. *
  10. * v.Connect is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. */
  14. #include "Lyric.h"
  15. namespace vconnect
  16. {
  17. Lyric::Lyric()
  18. {
  19. this->lyric = "あ";
  20. }
  21. Lyric::Lyric( string line )
  22. {
  23. this->lyric = line.substr( 0, line.find( "," ) );
  24. this->lyric = this->lyric.substr( this->lyric.find( "\"" ) + 1, this->lyric.rfind( "\"" ) - 1 );
  25. }
  26. string Lyric::getLyric()
  27. {
  28. return this->lyric;
  29. }
  30. string Lyric::toString()
  31. {
  32. string ret;
  33. ret += "{lyric=" + this->lyric + "}";
  34. return ret;
  35. }
  36. }