We present a general algorithm which permits us to construct solutions in string cosmology for heterotic and type-IIB superstrings in four dimensions. Using a chain of transformations applied in sequence-conformal, T duality, and SL(2,R) rotations, along with the usual generating techniques associated with Geroch transformations in Einstein frame-we obtain solutions with all relevant low-energy remnants of the string theory. To exemplify our algorithm we present an inhomogeneous string cosmology with S-3 topology of spatial sections, discuss some properties of the solution, and point out some subtleties involved in the concept of homogeneity and isotropy in string cosmology.